Edit 3
I installed the new version of eclipse (Mars - 4.5.0) and everything works. However, when I reinstall Scala through the Eclipse Marketplace, the problem reappears. Maybe this is something with the Scala plugin?
EDIT 2
I talked more with him and found that if I delete certain packages, the functionality will return. In particular, if I remove the functional and io packages, the ability to run all the testing of the project returns. Renaming packages does not help, just removing them. Also, if I add JUnit tests to these packages, I still cannot run this test through the package explorer by running the whole package.
I am having a problem with a specific Java project in Eclipse. When I try to run all JUnit tests from the project explorer (via [right click on project folder] --> run as --> JUnit Test ), I get an error message that many people see:
Problem Running JUnit tests: No tests found with test runner "JUnit 4"
When you click "OK" in the message, the dialog "Run configuration" appears.
What is strange is that the problem seems very isolated from this project with the full implementation of the project. I can do the following without problems:
- Run any single test in this project by opening it and clicking the green launch button at the top.
- Run any single test in this project by right-clicking on a class in the project explorer and choosing to run as JUnit Test
- Run all the tests in any package inside this project using the same method.
- Run all tests in any other project using the same method.
I tried the standard materials mentioned in similar posts, nothing works. In particular, I tried:
- Restart eclipse
- Rebooting my computer.
- Project cleanup and restoration
- Removing a project and repeating from git and then re-adding to eclipse
- Adding @RunWith annotation to my test cases
- Make sure all my test cases start with a “test”
- Using JUnit3 instead
- Removing all JUnit startup configurations and re-creating this startup configuration
In addition, I clearly remember this functionality, which worked some time ago for this project, but I don’t remember exactly when. So I have to add / modify / delete something that caused the error.
EDIT recommendations @ Durron597: Unfortunately, none of the suggestions worked. I also tried removing every JUnit startup configuration and trying to create the setup process again, but still no luck.
My eclipse version: Luna Service Release 2 (4.4.2)
My JUnit Version: 4.11
JUnit screenshot settings: 
Here is the code from one test:
package common; import static org.junit.Assert.*; import java.util.ArrayList; import java.util.HashSet; import org.junit.Test; public class UtilTest { @Test public void testWrappers(){ short[] s = {1,2,3,4}; Short[] s2 = Util.boxArr(s); short[] s3 = Util.unboxArr(s2); assertEquals(s.length, s2.length); assertEquals(s.length, s3.length); for(int i = 0; i < s.length; i++){ assertEquals(s[i], s2[i].shortValue()); assertEquals(s[i], s3[i]); } int[] i = {1,2,3,4, Integer.MAX_VALUE, Integer.MIN_VALUE}; Integer[] i2 = Util.boxArr(i); int[] i3 = Util.unboxArr(i2); assertEquals(i.length, i2.length); assertEquals(i.length, i3.length); for(int x = 0; x < s.length; x++){ assertEquals(i[x], i2[x].intValue()); assertEquals(i[x], i3[x]); } long[] l = {1,2,3,4, Integer.MAX_VALUE, Integer.MIN_VALUE, Long.MAX_VALUE, Long.MIN_VALUE}; Long[] l2 = Util.boxArr(l); long[] l3 = Util.unboxArr(l2); assertEquals(l.length, l2.length); assertEquals(l.length, l3.length); for(int x = 0; x < s.length; x++){ assertEquals(l[x], l2[x].longValue()); assertEquals(l[x], l3[x]); } float[] f = {1,2,3,4, 0.4f, 0.1f, Float.MAX_VALUE, Float.MIN_NORMAL}; Float[] f2 = Util.boxArr(f); float[] f3 = Util.unboxArr(f2); assertEquals(f.length, f2.length); assertEquals(f.length, f3.length); for(int x = 0; x < s.length; x++){ assertEquals(f[x], f2[x].floatValue(), 0.00001); assertEquals(f[x], f3[x], 0.00001); } double[] d = {1,2,3,4, 0.4, 0.1, Float.MAX_VALUE, Float.MIN_VALUE, Double.MAX_VALUE, Double.MIN_NORMAL}; Double[] d2 = Util.boxArr(d); double[] d3 = Util.unboxArr(d2); assertEquals(d.length, d2.length); assertEquals(d.length, d3.length); for(int x = 0; x < s.length; x++){ assertEquals(d[x], d2[x].doubleValue(), 0.00001); assertEquals(d[x], d3[x], 0.00001); } char[] c = {1,2,3,4, 'a', 'b', '.', Character.MAX_VALUE, Character.MIN_VALUE}; Character[] c2 = Util.boxArr(c); char[] c3 = Util.unboxArr(c2); assertEquals(c.length, c2.length); assertEquals(c.length, c3.length); for(int x = 0; x < s.length; x++){ assertEquals(c[x], c2[x].charValue()); assertEquals(c[x], c3[x]); } } @Test public void testRandElement(){ assertTrue(null==Util.randomElement(null)); HashSet<Integer> s = new HashSet<>(); assertTrue(null==Util.randomElement(s)); for(int i = 0; i < 10; i++){ s.add(i); } HashSet<Integer> s2 = new HashSet<>(); while(! s2.equals(s)){ Integer i = Util.randomElement(s); s2.add(i); assertTrue(s.contains(i)); } } @Test public void testPermute(){ ArrayList<Integer[]> a = Util.permute(new Integer[]{1,2,3,4}); assertEquals(a.size(), 24); for(Integer[] i : a){ assertEquals(i.length, 4); assertEquals(10, i[0] + i[1] + i[2] + i[3]); } HashSet<Integer[]> s = new HashSet<>(a); assertEquals(s.size(), 24); a = Util.permute(new Integer[]{}); assertEquals(a.size(), 1); } }
The whole project is at https://github.com/Mshnik/UsefulThings , if that helps.