Eclipse/Android Studio/WebStorm/IntelliJ run a continuous process in parallel - eclipse

I have a process that is building some modules each time I make changes to my code. The process is continuous unless I close it and I want to run it each time I launch my app. I can see a before launch section in my Run/Debug Configurations settings of my IDE but, If I add my process there, the main process is never spawned since the IDE is probably waiting for the first one to finish.
Any idea how to make these two run in parallel?

Use the Compound run/debug configuration.

Related

Eclipse Launch Group: Stop if single launch configuration fails

We are having Maven projects relying on each other, which are built separately and included as dependencies. So to have a single button to compile all the intermediate steps, I use Eclipse Launch Groups. However when a single build fails, the Launch Group just goes on, which can be unrecognizable unless you control every single console instance.
Is there a way to stop the execution if a single step fails? Maybe Launch Groups are not the perfect fit and there is another tool for multiple Run Configuration executions?
By try-and-error I found the following solution, which works for our Maven builds: Chose as "Post launch action" "Wait for console output", and let it wait for "[INFO] BUILD SUCCESS". This pauses the execution of the launch group at the failed process, pointing you directly to the first occured error.
If you use other build setups or tools you have to check which string gets exclusively printed on build success.

Stop selenium test execution from eclipse

My scenarios starts to fail, and I have so many scenarios. I need to terminate test execution (I dont want to wait). How I can do that from ECLIPSE?
I am avare of the fact that there is a some button to stop test execution from eclipse. But i do not know how to add it, is it default or I can get it as extension from eclipse market place.
It should be the same as stopping any app in Eclipse. The stop button can be found above the console to the right (Picture below).
However keep in mind that this will then not close the browser driver and you will need to do that manually. Easiest way for me was using the command "taskkill -IM chromedriver.exe -f", chromedriver can only be killed when the force (-f) flag is used. Alternatively you could add some more functionallity to your app to allow you to break within the app that will stop the execution and close the driver.
Stop button

IntelliJ: Keep junit running during Integration Testing

With Eclipse and Spring Tool Suite when creating a Debug configuration we can check the Keep JUnit running after a test run when debugging. Because we're using the SpringJUnit4ClassRunner and loading the Spring app before running, startup time before these test can run is significant so this is a huge time saver for rerunning tests and even hotswapping basic changes.
However, I recently switched to IntelliJ and I'm unable to find an equivalent option for this feature. Can someone tell me where it is?
You can achieve something very similar to Eclipse's "Keep JUnit running after a test run when debugging" by doing the following:
Create a new JUnit Run/Debug configuration with Test kind set to
Method and Repeat to Until Stopped
Choose your test class and the method you plan to test and save the configuration
Now, start the test in Debug mode using the configuration you just created. You will notice that the test will run over and over again without reloading the Spring context.
Hit the sort a-z button in the Debug tab so that the latest JUnit test run is always shown at the top
Pause the test from the Debug or Run tab (the || button on the left)
Make your changes to the code and then build. Changes will be hot swapped. For the best results, I recommend also using HotSwap Agent or JRebel
Resume the test from the Debug or Run tab
Rinse and repeat from 5 to 7 until you are done with the test
Note that pausing the test is optional, changes will be reloaded anyway between test runs.
The only downside of this strategy is that you can only keep-alive test one method at a time.

In TeamCity, can I run a command-line application for the duration of a build?

I have a command-line application that I want to run in a build configuration for the duration of the build, then shut it down at the end when all other build steps have completed.
The application is best thought of as a stub server, which will have a client run against it, then report its results. After the tests, I shut down the server. That's the theory anyway.
What I'm finding is that running my stub server as a command line build step shuts down the stub server immediately before going to the next build step. Since the next build step depends on the server running, the whole thing fails.
I've also tried using the custom script option to run both tools one after another in the same step, but that results in the same thing: the server, launched on the first line, is shut down before invoking the second line of the script.
Is it possible to do what I'm asking in TeamCity? If so, how do I do it? Please list any possibilities, right up to creating a plugin (although the easier, the better).
Yes you can, you can do that in a Nant script, have Teamcity run the script, look for spawn and the nantContrib waitforexit.
However I think you would be much better off creating a mock class that the client uses only when running the tests. Instead of round tripping to the server during the build as that is can be a bit problematic, sometimes ports are closed, sometimes the server hangs from the last run, etc. That way you can run the tests, make sure the code is doing the right thing when the mock returns whatever it needs to return etc.

Unleash Process in Eclipse

Is is possible to 'unleash', or whatever, a process in Eclipse that you've been debugging, or simply started with 'run'? Would be nice. After such an 'unleash-ment', the unleashed process should not die when Eclipse is shut down, and should be removed from the debug view, to avoid accidentally killing it. Essentially, become a regular application process.
thanks, -j
There is no such command/option in Eclipse and it might not even possible depending on the OS. If you want a Java process to survive the end of Eclipse, you must start it outside.
It's sad that, after more than a decade, creating standalone processes in Java is still so painful. There is the -jar option but there is no way to have more than a single main() method this way, few people know how to build a working classpath when starting your app this way.