theanubhava
theanubhava

Reputation: 576

How NOT to skip tests in my maven test project?

I have created a maven project, it has a number of classes inside it. Each class has test methods, and these are annotated with @Test, and each method starts with "test.." string. I can individually run the java file over Junit, and can see the result(red.green and similar details).

What I want is, to run all the tests in all the java files, in single go.

I have tried "mvn test" command. But when I run it, this shows "Tests are skipped" and when i try to add below to surefire plugin, I get error that this is not supported.

<skip>false</skip>

also tried
mvn test -Dmaven.test.skip=false but it also performed in similar manner

After suggestion below, I added the files inside "src/test/java". now again, i am getting same issue.

[INFO] --- maven-surefire-plugin:2.14.1:test (default-test) @ com.project.cq.i18n.it.http --- [INFO] Tests are skipped.

Upvotes: 0

Views: 1436

Answers (1)

ravthiru
ravthiru

Reputation: 9663

All your Junit test classes should be in src/test/java/ and class names should end or start with Test

Upvotes: 1

Related Questions