maven test report format
When I run the tests In my Java/Groovy Maven project, the test reports are stored in target/surefire-reports
. For each test class that is run a .txt
and .xml
file is created showing the output of that class.
All in all, this is a remarkably unhelpful format, as it doesn't provid开发者_运维技巧e any easy way to quickly see which tests failed and the output they produced. I'd like something similar to Grails' test reports. Is there are any easy way to change the report format to something more user friendly?
Ideally, I'd like this report to be generated when I run mvn test
, i.e. I'd prefer not to have to run mvn site
to generate it.
I am using the Maven Surefire Report plugin to generating the unit testing report. The web site is http://maven.apache.org/plugins/maven-surefire-report-plugin
My POM looks like the following: -
<reporting>
<plugins>
....
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.9</version>
</plugin>
</plugins>
</reporting>
I hope this may help to achieve your requirement.
//Edit: I also use the CI server, the Jenkins, which provides the unit testing report as well.
Regards,
Charlee Ch.
Sort the folder by size in ascending order. Biggest .txt
files are the output of failed tests.
There is an HTML report plugin (here), but not sure this is what you want. If you need something more specific, I guess you'll need to develop your own Maven plugin.
精彩评论