Tuesday, February 24, 2009

JUnit HTML Report

Normally developers write JUnit test cases for unit testing, and analysis the output, but some time we prefer a proper junit report or a nice presentation of junit results rather than all results that just printed in the console.


Recently I have discovered one useful tool that can easily generate junit result into proper TXT, XML or HTML reports.But this tool actually is a plugin for maven, so maven environment needed to be setup in order to use this plugin named surefire, basically the Surefire Plugin is used during the test phase of the build life cycle to execute the unit tests of an application. It generates reports in 2 different file formats, which is Plain text files (*.txt), XML files (*.xml)

For HTML reports, there is another extension of surefire plugin, which is Surefire Report Plugin, which allows tester to compile Junit result to HTML .

No comments: