The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

TestNG Results Plugin

step([$class: 'Publisher']): Publish TestNG Results

  • escapeExceptionMsg (optional)
    Escape exception messages?

    If checked, the plug-in escapes the test method's exception messages. Unchecking this allows you to use HTML tags to format the exception message e.g. embed links in the text. (Enabled by default)

    • Type: boolean
  • escapeTestDescp (optional)
    Escape Test Description string?

    If checked, the plug-in escapes the description string associated with the test method while displaying test method details. Unchecking this allows you to use HTML tags to format the description. (Enabled by default)

    • Type: boolean
  • failedFails (optional)
    Fails - Failed Threshold

    A build is marked FAILURE if the number/percentage of failed tests exceeds the specified threshold.

    • Type: int
  • failedSkips (optional)
    Skips - Failed Threshold

    A build is marked FAILURE if the number/percentage of skipped tests exceeds the specified threshold.

    • Type: int
  • failureOnFailedTestConfig (optional)
    Mark as failure on Failed Test Configuration Methods

    Allows for a distinction between failing tests and failing configuration methods. Failing tests can be seen as an unstable build whereas failing configuration methods are a failed build. This will trump any settings in Thresholds section.

    • Type: boolean
  • reportFilenamePattern (optional)
    TestNG XML report pattern

    This is a file name pattern that can be used to locate the TestNG XML report files (for example **/target/testng-results.xml).

    The path is an Ant-style pattern (e.g. fileset) or a list of files and folders separated by the characters ;:,

    TestNG must be configured to generate XML reports using org.testng.reporters.XMLReporter for this plug-in to function.

    • Type: String
  • showFailedBuilds (optional)
    Show Failed builds in Trend Graph?

    If checked, the plug-in includes results from failed builds in the trend graph. (Disabled by default)

    Note:

    • If this is a maven build, it is better to configure the build step with -Dmaven.test.failure.ignore=true option. This results in build with test failures being marked as Unstable, thus distinguishing it from build that failed because of non test related issues
    • Even when this option is selected, failed builds with no results and aborted builds will not be displayed in graphs

    • Type: boolean
  • thresholdMode (optional)
    • Type: int
  • unstableFails (optional)
    Fails - Unstable Threshold

    A build is marked UNSTABLE if the number/percentage of failed tests exceeds the specified threshold.

    • Type: int
  • unstableSkips (optional)
    Skips - Unstable Threshold

    A build is marked UNSTABLE if the number/percentage of skipped tests exceeds the specified threshold.

    • Type: int

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.