A common way to run a package of tests is to right-click on an appropriate level within the Eclipse Package Explorer and select Debug As > JUnit Test or Run As > JUnit Test. This works only intermittently with the Scala IDE, at least for me and my team. Much of the time we receive the following error:
No tests found with test runner 'JUnit 4'.
We are using Scala IDE 4.1.1-vfinal-20150727-1320-Typesafe.
Steps to reproduce:
1. Set up a functional Maven build environment as necessary.
2. Download and extract the attached code.
3. From within the "crab/appserver/corelib" folder, run "mvn install".
4. From within the "crab/appserver/corelib" folder, run "mvn eclipse:eclipse".
5. Launch the Scala IDE.
6. Select "File > Import", then "General > Existing projects into workspace".
7. Browse to the folder that you extracted the code to and select the appserver-corelib project.
8. You may need to fix up the runtime libraries to find Java 8.
9. Hopefully the project built correctly and there are no errors.
10. Right click on "src/test/java" in the Package Explorer and select "Run As > JUnit 4 Test".
11. Observe error message mentioned above.
If you follow all of the above steps in the normal Eclipse JEE Luna distribution, the JUnit 4 tests are found and run appropriately.
Sometimes you can get the error to go away by opening the files within the package in the editor.
No tests found with test runner 'JUnit 4'.
We are using Scala IDE 4.1.1-vfinal-20150727-1320-Typesafe.
Steps to reproduce:
1. Set up a functional Maven build environment as necessary.
2. Download and extract the attached code.
3. From within the "crab/appserver/corelib" folder, run "mvn install".
4. From within the "crab/appserver/corelib" folder, run "mvn eclipse:eclipse".
5. Launch the Scala IDE.
6. Select "File > Import", then "General > Existing projects into workspace".
7. Browse to the folder that you extracted the code to and select the appserver-corelib project.
8. You may need to fix up the runtime libraries to find Java 8.
9. Hopefully the project built correctly and there are no errors.
10. Right click on "src/test/java" in the Package Explorer and select "Run As > JUnit 4 Test".
11. Observe error message mentioned above.
If you follow all of the above steps in the normal Eclipse JEE Luna distribution, the JUnit 4 tests are found and run appropriately.
Sometimes you can get the error to go away by opening the files within the package in the editor.
Leave a comment
on 2015-08-10 12:20 *
By wpopielarski769697
hmm... I've been verifying it on my local and finds junit tests. Let me take a closer look at that specific version
on 2015-08-10 12:33 *
By wpopielarski769697
Problem verified and really impacts Scala IDE 4.1.1.v-2_11-201507261049-bc34267. Starting investigation...
on 2015-08-10 12:36 *
By wpopielarski769697
Good news is that 4.2.0-nightly is free of this bug
on 2015-08-10 12:58 *
By wpopielarski769697
Not sure if you will be satisfied by my answer but if you could try to use a latest nightly (I run 4.2.0.nightly-2_11-201508100514-271df16) and see if it solves problem I'll be grateful. Version 4.2.0 is coming probably this week.
No file chosen
You have an empty file field. Please select or remove it.
Name | Size | ||
---|---|---|---|
junit4_runner_problem_sample_code.zip | 227 KB | Added by mpderbec on 2015-08-03 - Upload new version |