Skip to content

Contains a JUnit RunListener for generating JUnit XML reports

Notifications You must be signed in to change notification settings

boycs007/JUnitXmlFormatter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#JUnitXmlFormatter

This repository contains an AntXmlRunListener, based on the one contained in Schmant. This RunListener can be used to generate JUnit XML reports which can be read by various integration servers and development tools.

Programmatic Usage:

// default constructor will look for system property "org.schmant.task.junit4.target", with path to output XML file.
AntXmlRunListener runListener = new AntXmlRunListener()

// or you can set the output stream
runListener.setOutputStream(new FileOutputStream(new File("file_name.xml")));

// then you need to configure the RunListener to be used by JUnit, depending on your setup. Have a look at
// org.junit.runner.JUnitCore as well as barrypitman.junitXmlFormatter.Runner

Commandline usage:

# Run the test mypackage.Suite1, using barrypitman.junitXmlFormatter.Runner#main(String...) to run the tests
java -cp test-jar-with-dependencies.jar -Dorg.schmant.task.junit4.target=junit_report.xml barrypitman.junitXmlFormatter.Runner mypackage.Suite1

About

Contains a JUnit RunListener for generating JUnit XML reports

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%