Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: bind some key for all unit tests

Tags:

junit

tdd

eclipse

I practice TDD and run my tests very often. Eclipse has a nice command to run the last-launched configuration. But when I invoke the command in some unit test class, Eclipse runs only the tests for current unit test class. I want run all my unit tests instead. Yes, I can use the mouse to invoke the command that runs all JUnit tests, but, to repeat: I run tests very often.

like image 746
dmitrynikolaev Avatar asked Jul 19 '09 18:07

dmitrynikolaev


2 Answers

You need to change eclipse's run mode. By default, it will try to run whatever is selected or being edited. You want to it always run the "last thing executed".

Go to Window->Preferences->Run/Debug->Launching Choose "Always Launch the Previous Application"

Then you can define a TestSuite with all of your test cases and run it, or run all test cases for the project. Once run, you can just keep re-running with F11 or control-F11.

Hope this helps! -- Scott

like image 196
Scott Stanchfield Avatar answered Oct 23 '22 17:10

Scott Stanchfield


Maybe Infinitest is what you need.

like image 20
duffymo Avatar answered Oct 23 '22 17:10

duffymo