Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Maven] Nice HTML test-reports

 
Tiago Fernandez
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again,

I need to generate decent test-reports (HTML) using Maven, not those uglies XML's. I used to do it using Ant, but I wonder if already exists the same feature in Maven. I know I can use maven site:generate, but it produces a lot of other things, and I just want the test reports

Any idea?

Thx!

[ July 20, 2005: Message edited by: Tiago Fernandez ]
[ July 20, 2005: Message edited by: Tiago Fernandez ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tiago,
Maven has a junitreport plugin, similar to the one used by JUnit. This converts the ugly XML into HTML.
 
Jared Cope
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Originally posted by Tiago Fernandez:
I know I can use maven site:generate, but it produces a lot of other things, and I just want the test reports


I include a maven.xml file in the same top level directory that has the project.xml file. In here, you can de-register some reports that you don't want to be included when you run site:generate.

In my case, I de-register all the reports that rely on CVS access because late last year we upgraded our version of CVS which introduced date-parsing problems for all of these maven CVS reports. So instead of generating the website and having empty reports for these categories, I de-register them from the build task. This is what my maven.xml looks like, you should be able to customize to remove the reports that you are not interested in by using this as a template:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic