When I try running JUnit tests, I get the error message
No tests found with test runner 'JUnit 4'
and therefore I have tried solutions from
However, in my case, the difference seems to be that I specify the tests to run on package level instead of folder level.
Running JUnit tests works if I specify a package that directly contains test classes (e.g. com.example.tests.smoketests
) but does not work if a higher level package is specified (e.g. com.example.tests
).
If I define a test in com.example.tests
, it is found and run.
Is there a way to let Eclipse/JUnit find tests in a package and all subpackages?