Confluence 4.1 : JUnit Report Macro

 

The JUnit Report macro displays a summary of JUnit test results from a directory accessible by the Confluence server. JUnit is a unit testing framework which allows programmers to ensure that individual units of Java source code are functioning correctly.

The JUnit Report macro appears as shown in the screenshot below.

Screenshot: The JUnit Report macro in Confluence

(info) When generating reports from the JUnit Report macro, set the Apache Ant formatter to 'XML'.

Using the JUnit Report Macro

To add the JUnit Report macro to a page:

  1. In the Confluence editor, choose Insert > Other Macros.
  2. Find and select the required macro.

Parameters

When editing, you can click on the macro placeholder and choose Edit to display the parameters for this macro in the Macro Browser.

Parameters are options that you can set for Confluence macros to control the content or format of the macro output. The table below lists parameters for this macro that can be set in the Macro Browser.

Parameter

Default

Description

URL of the test result XML file

None

URL of a particular test result XML file. Is overridden by the Directory (URL) of your test result files parameter if you use both.

Example, from a Confluence instance: http://yourConfluenceInstance.com/download/attachments/<page id>/file.xml

For Confluence installations without anonymous user access, you can specify logon credentials as part of this parameter in the form of URL parameters:

  • os_username — The username of a Confluence user with permission to access to the JUnit test results.
  • os_password — The password of the Confluence user specified in the os_username parameter.

Directory (URL) of your test result files

None

URL of a directory containing your test result files. This must be a directory name and not the XML file itself. Overrides the URL of the test result XML file parameter if you use both.

Example, for a local drive: file:///C:/TEMP/

Example, for a network drive: http://*host*/*path*

Report Detail

all

Detail for the report. Can be all, fixture, summary or failuresonly.

Debug

None

Shows the content of failures, as well as the error messages.

Related Topics

Working with Macros

Take me back to the Confluence User's Guide.