I am trying to run some JUnit test modules in Eclipse 3.5, but to no avail.
JUnit3 is working fine.
When I create the JUnit4 testing module, Eclipse suggests adding the JUnit library to the classpath. I accept, but when I check to see if it has been added to the project properties panel, I see that JUnit4 has been added, but JARS is where it was included.
If I select Change , the message " JUnit 4 " appears in the line and just below " Current location: not found ."
When I run the JUnit4 test, I get an error message and an internal NullPointerException error occurs .
I read for about two days, and all the links say that the eclipse includes JUnit4, but it seems like I'm missing something.
I tried unsuccessfully to recreate my projects and create a test in new ones.
package test;
import static org.junit.Assert.*;
import org.junit.Test;
public class AuthServiceTest {
@Test
public final void testValidateCredentials() {
fail("Not yet implemented");
}
}
[edit]
I added junit-4.8.1.jar to the project classpath and eclipse classpath, but the problem is still the same.
[Edit2]
I also added junit-dep-4.8.1.jar, since I'm not sure if these dependencies are needed, but without changes.
source
share