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

testNG: Publish TestNG Results

  • escapeExceptionMsg : boolean (optional)
    Escape exception messages?

    If checked, the plug-in escapes the test method's exception messages.

    If unchecked, this allows you to use HTML tags to format the exception message e.g. embed links in the text. (Enabled by default)

    However, if this field is unchecked, you are vulnerable to a cross-site scripting attack through an HTML exception message.

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

    If checked, the plug-in escapes the description string associated with the test method while displaying test method details.

    If unchecked, this allows you to use HTML tags to format the description. (Enabled by default)

    However, if this field is unchecked, you are vulnerable to a cross-site scripting attack through an HTML test description.

  • failedFails : int (optional)
    Fails - Failed Threshold

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

  • failedSkips : int (optional)
    Skips - Failed Threshold

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

  • failureOnFailedTestConfig : boolean (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.

  • reportFilenamePattern : String (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.

  • showFailedBuilds : boolean (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

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

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

  • unstableSkips : int (optional)
    Skips - Unstable Threshold

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


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.