Our continuous integration build using CruiseControl currently does a :-
mvn install

however this doesn't produce any HTML JUnit reports, so we then then follow
the above with

mvn surefire-report:report

to generate the html reports. This seems to do more than just generate the
html it actually runs the tests. So I thought maybe I should bind the
execution of surefire-report:report plugin to the test phase so that it
happens automatically.

<plugin>
 <groupId>org.codehaus.mojo</groupId>
 <artifactId>surefire-report-maven-plugin</artifactId>
 <executions>
  <execution>
   <id>produce HTML reports</id>
   <phase>test</phase>
   <configuration>
   </configuration>
   <goals>
    <goal>report</goal>
   </goals>
  </execution>
 </executions>
</plugin>

But this gives me two problems :-

1) If a test fails the above is never executed - so you can't see failed
tests in HTML. This is also true if surefire-report:report is invoked
separately. There's seems no point in having pretty html reports if the
results is always 100% and therefore you don't need to look at them

2) If no tests fail, then the above plugin causes the executions of the
tests to go into an endless loop !

Any thoughts?

Reply via email to