I had an already working JUnit4 Selenium test enviroment. After I switched from Java 8 to 11 eclipse doesn't always find my tests anymore. I can fix it eventually, but it always takes time. Can you help me fix it?
Every test has an @Test
Annotation and the test project worked for years without those problems. My Folder structure is like:
ProjectName/src/test/java/testPackage/testClass.java
If eclipse doesn't find the tests I'm using the following options which seem all sometimes to work and sometimes not:
- restarting Eclipse
- rebuilding project
- renaming some test with a prefix "test" ~ I know, crazy.
- reloading all test files in eclipse [F5]
- changing the Run Configuraion source folder to
src/test/java
.
All those "solutions" aren't always helping and I have to try around to find the one that helps. But I can fix it eventually.
Does anyone have a solution that always fixes that kind of problem? Or even better, is there a solution to fix it permanently?