×
Find plugins

JUnit1.21Minimum Jenkins requirement: 1.580.1ID: junit

Installs: 146429
Last released: 3 months ago
Maintainers
ogondza

Allows JUnit-format test results to be published.

Plugin Information

Plugin ID

junit

Changes

In Latest Release
Since Latest Release

Latest Release
Latest Release Date
Required Core
Dependencies

1.21 (archives)
Aug 04, 2017
1.580.1
structs (version:1.2)

Source Code
Issue Tracking
Pull Requests
Maintainer(s)

GitHub
Open Issues
Pull Requests
n/a (id: ogondza)

Usage

Installations

2016-Aug 118586
2016-Sep 120371
2016-Oct 120231
2016-Nov 124341
2016-Dec 122442
2017-Jan 129827
2017-Feb 128986
2017-Mar 139492
2017-Apr 134485
2017-May 141335
2017-Jun 141762
2017-Jul 141725

The JUnit plugin provides a publisher that consumes XML test reports generated during the builds and provides some graphical visualization of the historical test results (see JUnit graph for a sample) as well as a web UI for viewing test reports, tracking failures, and so on. Jenkins understands the JUnit test report XML format (which is also used by TestNG). When this option is configured, Jenkins can provide useful information about test results, such as trends.

This functionality was part of the Jenkins Core until it was split out to this plugin in version in 1.577.

Configuration

The JUnit publisher is configured at the job level by adding a Publish JUnit test result report post build action. The configuration parameters include:

  • Test report XMLs: Specify the path to JUnit XML files in the Ant glob syntax, such as **/build/test-reports/*.xml. Be sure not to include any non-report files into this pattern. You can specify multiple patterns of files separated by commas. The base directory of the fileset is the workspace root.
  • Retain long standard output/error: If checked, any standard output or error from a test suite will be retained in the test results after the build completes. (This refers only to additional messages printed to console, not to a failure stack trace). Such output is always kept if the test failed, but by default lengthy output from passing tests is truncated to save space. Check this option if you need to see every log message from even passing tests, but beware that Jenkins's memory consumption can substantially increase as a result, even if you never look at the test results!
  • Health report amplification factor: The amplification factor to apply to test failures when computing the test result contribution to the build health score. The default factor is 1.0. A factor of 0.0 will disable the test result contribution to build health score, and, as an example, a factor of 0.5 means that 10% of tests failing will score 95% health. The factor is persisted with the build results, so changes will only be reflected in new builds.
  • Allow empty results: If checked, the default behavior of failing a build on missing test result files or empty test results is changed to not affect the status of the build. Please note that this setting make it harder to spot misconfigured jobs or build failures where the test tool does not exit with an error code when not producing test report files.

Changelog

Version 1.21 (Aug 4 2017)

  • PR #65: Do not register XMLEntityResolver as a global extension
  • PR #69: Fix a file descriptor leak
  • PR #71: Expose test data publicly
  • PR #77: Improve test results table readability

Version 1.20 (Feb 13 2017)

  • JENKINS-41134 Incorrect reporting of multiple test results in some cases using Pipeline.
  • JENKINS-29736 Incorrect vertical axis values in test duration graph.

Version 1.19 (Oct 17 2016)

  • JENKINS-32148 Highlight test result lines on hover.
  • PR #49 Do not bury 'AllowEmptyResults' configuration option in Advanced.
  • PR #56 Add '<' and '>' as unsafe URI characters.

Version 1.18 (Aug 08 2016; 1.16 & 1.17 were botched)

  • Symbol added in 1.15 did not work in Jenkins 1.x.

Version 1.15 (Jul 12 2016)

  • Integrate Symbol annotation.

Version 1.14 (Jul 5 2016)

  • JENKINS-28784 make TestDataPublisher work in Pipeline.
  • PR #46 Option to cap, or at least log, number of iterations of AbstractTestResultAction.buildDataSet.
  • PR #45 Prevent wrapping for test name table cell.

Version 1.13 (May 1 2016)

Version 1.12 (Apr 20 2016)

  • PR #36 Resolve occurrences of Sonar rule "UselessParenthesesCheck - Useless parentheses around expressions should be removed to prevent any misunderstanding" (see this)
  • PR #35 Testsuite duration may be parsed from time attr.
  • JENKINS-33343 Upgrade to parent POM 2.x

Version 1.11 (Feb 25 2016)

  • Testsuite duration can be retrieved from its time attribute if it exists
  • Remove the glitch symbol in the JUnitResultArchiver configuration

Version 1.10 (Dec 10 2015)

  • (info) JENKINS-12815 Added Job Configuration Option allowing to NOT fail JUnit Report publish when no xml report files
  • (info) PR #23 Remove ambiguity between empty and unreadable files
  • (plus) PR #24 Add API allowing to access passed and skipped tests

Version 1.9 (Sep 3 2015)

  • Export TestActions on the TestObject to make them accessible via the REST API
  • JENKINS-24352 JUnit test result table wrapping duration text

Version 1.8 (Jul 29 2015)

  • JENKINS-29613 Failure summary jumps to the top of the page when expanded/collapsed.

Version 1.7 (Jul 17 2015)

Version 1.6 (May 01 2015)

  • JENKINS-26077 Duplicated result links when using the xUnit plugin.
  • JENKINS-27974 Unusable URL produced when classname field in results was empty.

Version 1.5 (Mar 11 2015)

  • Trim stdio even on failing tests, just to a 100× larger cutoff.
  • Diagnostics for an infinite loop.
  • Corrected help text.
  • Japanese translation edits.

Version 1.4 (Feb 04 2015)

  • NPE not known to affect actual usage but blocking tests of JENKINS-25446.

Version 1.3 (Dec 03 2014) (requires 1.580.1+)

  • JENKINS-25573 Health score factor did not work.
  • Repeated archiving fix in 1.2-beta-2 did not work on slaves.
  • JENKINS-24580 Older and newer links were swapped in the display.

Version 1.2 (Nov 06 2014)

Version 1.2-beta-4 (Nov 04 2014)

  • JENKINS-25375 Restore deprecated method override for binary compatibility.

Version 1.2-beta-3 (Oct 25 2014)

Version 1.2-beta-2 (Oct 20 2014)

  • Permit the archive step to be run multiple times on the same build, aggregating results. (Applicable from workflows, not from normal usage as a publisher in a freestyle project.)
  • Some configuration fields could not be set in 1.2-beta-1.
  • Typos in some text, and German localization fixes.
  • Do not show form validation errors when used from a non-freestyle context.
  • Ignore a noisy AccessDeniedException when listing jobs.

Version 1.2-beta-1 (Aug 25 2014)

Version 1.1 (Aug 25 2014)

  • Marked as dependent on 1.577, so 1.575/1.576 users should not install it.

Version 1.0 (Aug 11 2014)

Initial version after split.

ArchivesGet past versions
Labels