Integration tests not getting executed
I have some junit tests and htmlunit integration tests in one of my maven project. The problem is that my integration tests are not getting executed when I run
mvn clean test
Junit Tests Here:
Integration Tests Here:
How does mvn determines that AddressTest.java should execute and other one should not?
http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#includes describes the expected filepatterns.
btw, if you are talking about integration tests, have a look at the maven-failsafe-plugin. It uses *IT.java as file pattern
The problem is suffix Tests, should be Test in your PageTests.java!
By default, the Surefire Plugin will automatically include all test classes with the following wildcard patterns:
**/Test*.java - includes all of its subdirectories and all java filenames that start with Test.
**/*Test.java - includes all of its subdirectories and all java filenames that end with Test.
**/*TestCase.java - includes all of its subdirectories and all java filenames that end with TestCase.
Maven Failsafe Plugin is for integration tests and uses suffix IT. To invoke integration tests with Failsafe Plugin use
Problem resolved after executing following command: