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
stringrequiredThe file name pattern to locate TestNG XML report files. Supports Ant-style patterns.
Default: **/target/testng-results.xml
failed_fails
integeroptionalMaximum number of failed tests before the build is marked as FAILURE.
Default: 0
failed_skips
integeroptionalMaximum number of skipped tests before the build is marked as FAILURE.
Default: 0
threshold_mode
stringoptionalSpecifies the mode for threshold validation. Valid options- 'absolute' or 'percentage'.
Default: absolute
failure_on_failed_test_config
booleanoptionalIf true, the build will fail if any configuration method (e.g., @BeforeSuite, @AfterTest) fails.
Default: false
fail_if_no_results
booleanoptionalIf set to true, the build will fail if no test result files are found for the given pattern.
Default: false
log_level
stringoptionalDefines the plugin log level (debug/info). Set to debug to see detailed responses from TestNG.
Default: info