I have some Unit Tests (classes *Test.java in src/test folder, executed by Surefire Plugin) and some other Integration Tests (classes *IT.java in src/it folder, executed by Failsafe Plugin): .xml and .txt reports are correctly generated in folders target/surfire-reports and target/failsafe-reports when I run
mvn install
.
Furthermore I would like to have html reports: I think that the best solution should be to use mvn site
, in order to have also CSS files.
However, now only unit tests are executed, so only target/surfire-reports are generated and obviously the only html doc that is generated is about unit tests.
POM snippet below:
<build>
...
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
...
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
...
<goal>integration-test</goal>
<goal>verify</goal>
...
</plugin>
<plugin>
// definition of build helper maven plugin for the registration
// of the src/it folder
</plugin>
...
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.maven.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.19.1</version>
</plugin>
</plugins>
</reporting>
Clearly, mvn site
doesn't execute integration-test goal, but how can I solve?
PS: A silly solution is to run mvn site after mvn install (without a clean), but I would like to have something smarter.