I have several classes each containing several methods annotated with @Test. The classes are not extending TestCase. Now I want to
- write a main that executes all these methods (for command line use)
- create a class that can be “Run as -> JUnit Test” in Eclipse executing all these methods
Since the classes are no TestCases I can’t just add them to a suite. Also extending TestCase is not an option because the test methods are just annotated and their names don’t start with ‘test’.
How can I do this?
You can set up run configurations for a project. Right click on your project. Then selecte ‘Run as’ -> ‘Run configurations’. Within that you can select run all tests