Drone plugins > testng
testng.svg

testng

by harness-community


A plugin to process TestNG report files and log the test results in the console. It allows for threshold validation and failure conditions based on test outcomes.

Example

kind: pipeline
name: default

steps:
- name: testng to junit conversion
  image: plugins/testng
  settings:
    report_filename_pattern: "**/target/testng-results.xml"
    failed_fails: 5
    failed_skips: 3
    threshold_mode: absolute
    failure_on_failed_test_config: true
    fail_if_no_results: true

Properties

  • report_filename_pattern

    stringrequired

    The file name pattern to locate TestNG XML report files. Supports Ant-style patterns.

    Default: **/target/testng-results.xml

  • failed_fails

    integeroptional

    Maximum number of failed tests before the build is marked as FAILURE.

    Default: 0

  • failed_skips

    integeroptional

    Maximum number of skipped tests before the build is marked as FAILURE.

    Default: 0

  • threshold_mode

    stringoptional

    Specifies the mode for threshold validation. Valid options- 'absolute' or 'percentage'.

    Default: absolute

  • failure_on_failed_test_config

    booleanoptional

    If true, the build will fail if any configuration method (e.g., @BeforeSuite, @AfterTest) fails.

    Default: false

  • fail_if_no_results

    booleanoptional

    If set to true, the build will fail if no test result files are found for the given pattern.

    Default: false

  • log_level

    stringoptional

    Defines the plugin log level (debug/info). Set to debug to see detailed responses from TestNG.

    Default: info