Failed to run JUnit test in IntelliJ
I wanted to start a project using TDD. Created a test directory and then changed it to a package integrated with src direcotry. In both cases, I get the same error:
Class not found: "tests.objectsTest"
I tried different methods of importing JUnit jar and none of the problems were solved. Also I tried to rename my test class, but it doesn't give any cuts.
It seems like IntelliJ or JUnit is changing the name of the test class. Shouldn't it be "objectsTest.tests"?
I am using JUnit version 4.12 and latest IntelliJ EAP.
EDIT This is my project structure:
Project:
-.idea
-src
-logic
-objects
-tests
-test
-test.java
src and tests are directories marked as Source and Test. Every package except the test is empty. On my other machine with IntelliJ Community Edition, everything works fine, but EAP has this error. Unfortunately I have to use EAP.
Test.java code:
package test;
import org.junit.Test;
public class test {
@Test
public void canCreateInhabitant(){
}
}
source to share