Its very simple to create JUnit reports using eclipse
follow these steps and it worked for me
1) First generate an Ant build file for your project.
In the Export page select "Ant Buildfiles" it is under General. Then select a
project that contains your JUnit tests. The default JUnit output directory is
appropriately named "junit".
2) Next resolve dependencies by making sure that the junit.jar is added to Ant's
"Global Entries."
Window->Preferences->Ant->Runtime->Global Entries and Add External JARs...
Navigate to your "eclipse" directory (where eclipse is installed). It is under
"plugins" directory and presently the junit.jar is in a directory named
"org.junit_3.8.1". If this is missing then you will see error messages since
junit is an optional Ant task.
3) Run then right click on the Ant build file (by default build.xml) and Run
As->Ant Build... This will display a list of targets. All of the launch
configurations you have previously configured will have a corresponding target
in your Ant build file. Select the desired target(s), and also select the
"junitreport" target. Check the "Target execution order" text area to make sure
the junitreport is run last.
Whenever you run a test case it will generate results and will be placed in the
junit output directory. These results are formatted into an HTML report by the
junitreport target and stored in the junit output directory. This is a quick explanation of the process, but hopefully it helps get you off your feet.
For more info,check out http://www.mpowerglobal.com/web/guest/blog
0 comments:
Post a Comment