• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Generate Junit XML report in Java

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to generate a XML report in Java. Why in Java and not using Ant? Because I need to call the Junit Tests inside my code because it is dependent from other code and this is the only way.

I'm using the Ant Library and I have now this code:



And I'm getting a XML report, but it is not in the right JUnit format. Because now I can't use it in Jenkins.

This is the format I'm getting:



But I need the normal JUnit format: http://junitpdfreport.cvs.sourceforge.net/viewvc/junitpdfreport/src/resources/examples/testresults/TEST-net.cars.documents.AssuranceTest.xml?revision=1.9&view=markup
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic