JUnit report on Eclipse

11,677

Solution 1

You can use ant and generate HTML report [I think you can use Ant in Eclipse]
I found these link but you can survey more:

Ant JUnitReport Task
JUnit Tutorial
JUint Report

Solution 2

I'm not sure if you want a "physical" report that you can distribution or just more information you can view in your IDE.

Either way I agree with SjB's advice on configuring Eclipse to run the ant script generating the report in your nightly build.

If it's not possible to run the nightly build locally, you can do some very simple build script hacking following the links in SjB's answer.

You also might want to check out the Ant JUnit Task Manual Page

Share:
11,677
Mario Ortegón
Author by

Mario Ortegón

Connected Vehicles Azure Mobility Microsoft Connected Vehicle Platform

Updated on June 17, 2022

Comments

  • Mario Ortegón
    Mario Ortegón almost 2 years

    The JUnit integration with eclipse is very nice. However, I would like a feature to be able to generate a quick report from the Unit Tests. It is possible to do so when running a headless build (and my nightly build is configured to do so), but sometimes I want to generate a report from the UI.

    Is there anyway to do this? command line options maybe? an extra plugin? maybe the functionality is already there and I can't find it?

    EDIT: I have a PDE build, as my project is an RCP application. Thus, running the tests from this build is not really straight-forward. I guess I could try to hack a smaller ANT script to do the test, but then probably I have to fight with the classpath to obtain what I want. I was hoping to find some extension to the already existing JUnit plugin that would provide the information on the tree view, but as an HTML document.