This page last changed on Nov 02, 2008 by rhartono.

The JUnit Report Macro displays a summary of JUnit test results from a directory accessible from the Confluence server.

When generating reports, set ant formatter to 'XML'.

Junit Report Macro

{junitreport:directory=file:///*directory*/}

For example:

{junitreport:directory=file:///C:/TEMP/}

Must be a directory name and not the xml file itself.

or

{junitreport:url=http://*host*/*path*}

For example:

{junitreport:url=http://yourConfluenceInstance.com/download/attachments/<page id>/file.xml}

where:

directory : URL of a directory containing your test result files.
url : URL of a particular test result XML file.
reportdetail: Detail for report. Can be 'all', 'fixture', 'summary' or 'failuresonly'.
debug: Shows the content of failures, as well as the error messages.

If your Confluence instance is not accessible by anonymous users and you want to parse a XML file attached in a space, the macro might fail to render. To make this work you need to add this parameter: ?os_username=your_username&os_password=your_password in the url. For example:

{junitreport:url=http://yourConfluenceInstance.com/download/attachments/<page id>/file.xml?os_username=admin&os_password=admin}
RELATED TOPICS

Working with Macros

Take me back to Confluence User Guide

Document generated by Confluence on Dec 03, 2008 15:16