JUnit Eclipse Report

JUnit integration with eclipse is very nice. However, I would like the function to be able to generate a quick report from Unit Tests. This can be done when starting the assembly without heads (and my nightly assembly is configured for this), but sometimes I want to generate a report from the user interface.

Is there anyway to do this? perhaps command line options? additional plugin? maybe functionality already exists and i can't find it?

EDIT: I have a PDE build since my project is an RCP application. Thus, running tests from this assembly is not very straightforward. I guess I could try hacking a smaller ANT script to run the test, but I might have to fight the classpath to get what I want. I was hoping to find some extension for an existing JUnit plugin that would provide tree view information, but as an HTML document.

+6
java eclipse junit
source share
2 answers

You can use ant and generate an HTML report [I think you can use ant in Eclipse]
I found this link, but you can view more:

Ant Task JUnitReport
JUnit Tutorial
Juint report

+2
source share

I'm not sure if you need a “physical” report that you can distribute, or just additional information that you can view in your development environment.

In any case, I agree with SjB's advice on setting up Eclipse to run an ant script to create a report in your nightly build.

If you cannot start the nightly build locally, you can make the script very simple to build by following the links in the SjB answer.

You can also check the Ant JUnit manual page for guidance.

+1
source share

All Articles