Run redis-server as PyCharm configuration - redis

Every time I start one of my PyCharm projects, I have to go into a terminal window and start redis with the command redis-server. How can I add this as a run/debug configuration so I can combine it with other parts of my app? My goal is to have a single compound configuration that starts a Django web server, background worker, and redis.

In the run\debug configuration menu you can add shell script. But Redis process only possible to stop with ctrl+c.

Related

Restart run or debug mode when clicking on the button again

When I used to click Run or Debugin IntelliJ, it used to restart the running process but, now it spins up a new one. How can I change that?
Make sure Allow parallel run option is disabled in the Run/Debug configuration.

How to run shell commands in intellij after debugger ends

I'm trying to spin up docker container when I run a particular configuration in intellij, which I have done successfully by adding a 'Before Launch external tool command', as described here:
IntelliJ IDEA: Running a shell script as a Run/Debug Configuration
What doesn't seem obvious though is how I stop the container when the program has finished running? There doesn't seem to be any options for after.
How do I run a shell script when my run configuration finishes? (Either by reaching it's end, or being forcefully stopped).

Stop all servers in one action in IntelliJ

I am developing with IntelliJ. In this project, I need to run 3 servers.
Is there a way to create a shortcut to :
Stop all those servers in one click or keyboard shortcut
Optionally, restart them.
Thanks.
There doesn't seem to be a direct method to do this in IntelliJ, but if you can stop each one from a script, then you could just write a script and run it from IntelliJ. Personally, I'd just go to the terminal and run the script rather than configuring it directly in IntelliJ (which also has an embedded terminal, btw).

Run automated test cases on local machine's web browser - HUDSON

I use remote hudson server for test automation of webapplication. When I run the automated test cases they ran on the browser of that remote machine. I rather want them to run on my machine.
Is there a way I can achieve this.
Regards
You can run Jenkins slave on your machine and tie the job to it (there is such an option on the job definition page). Moreover, you can use NodeLabel Parameter plugin and use a parameter to specify to which node you want to tie your job. For example: by default it will run on Master, but you also can specify your slave when running it manually.
You don't say what tool you're using to drive the browser. If you're using selenium, you can set up a selenium server on your machine, then direct your tests to use your machine.
Considering you are talking about a test browser , I assume you use the selenium plugin for hudson/jenkins. you can change the location/capabilities of the node where the test are run against in your testcode.
capabilities.setBrowserName("firefox");
capabilities.setPlatform(org.openqa.selenium.Platform.WINDOWS);
also it's possible to exclude the master from the node list by editing the config file in the jenkins plugin folder
If you are refering to just restricting where the project can be run, this can be found
https://[jenkins name]/job/[jobname]/configure
under Restrict where this project can be run

Jenkins CI - java.exe child process hangs after job is done

I have following problem: on my Jenkins 1.438 I have job with maven 3 application. When I run it, sometimes after build is completed successfully Jenkins child process - java.exe - still hangs in the system. It also holds a handle to POM file and when I run my job again i get error that POM file cannot be deleted and build fails. Does anyone know how to fix this? Jenkins runs on Windows Server 2008
We experienced the same problem with Jenkins (on a Linux server).
I'm not sure if you can achieve this with Powershell in Windows server (or use windows-port of bash etc), but for example we start and stop our builds in Jenkins with seperated starter and stopper shell scripts. The point: start script saves the PID of the java process being started into a text file, and the stop script reads it and kills after a given amount of time.