publishTestResults
This configuration section contains settings related to publishing test results.
To read more about publishing test results see the Publishing test result files page. Please also check the command line reference for the publish-test-results command.
The following example shows the most common options within this section.
{
...
"publishTestResults": {
"testResult": {
"sources": [
{
"value": "test-result.trx"
}
]
},
"treatInconclusiveAs": "Failed",
"flakyTestOutcome": "lastAttemptOutcome",
"testRunSettings": {
"description": "Acceptance test results",
"folder": "/BDD"
},
"testResultSettings": {
"environment": "Staging"
}
},
...
}Settings
testResult
The test result configuration
testResult/sources— An array of test result sources. Each source should specify avalue(the path of the test result file or a folder containing multiple test result files) and optionally abaseFolder(the base folder for the test result file, defaults to the folder of the configuration file).testResult/resultFormat— The format of the test result file. Please check the Compatibility page for supported formats. Invoking thepublish-test-resultcommand with?as format as command line option will list all supported format as well.
specified as command line option
treatInconclusiveAs
Maps the Inconclusive test results. Some test execution frameworks report skipped scenarios as Inconclusive, so they should be mapped to another value, e.g. NotExecuted.
not mapped
flakyTestOutcome
Specifies how the overall outcome of flaky tests (tests that were rerun multiple times and at least one attempt failed) should be calculated.
lastAttemptOutcome— Uses the outcome of the last attempt (default behavior)failed— If any attempt failed, the overall outcome will be Failed, otherwise uses the last attempt outcome
For more details, see the Detecting test reruns and flaky tests section.
LastAttemptOutcome
onTestPointMissing
Specifies the behavior for the case when a Test Case result has found, but the Test Case is not included in the target for publishing results. Possible values: skipTestResult, warning, error
warning
publishEmptyResults
Publishes test results even if no matching results found.
false
publishAttachmentsForPassingTests
Controls which attachments should be published for passing tests. Possible values: none - no attachments are published for passing tests, files - only file attachments are published, all - both file attachments and test output are attached. Note: this setting does not affect publishing failing tests, which always publish all attachments.
files
testRunSettings
Specifies additional settings for the created test run. The value can contain placeholders.
testRunSettings/name— In Zephyr Scale, it sets the Test Cycle nametestRunSettings/description— In Zephyr Scale, it sets the Test Cycle descriptiontestRunSettings/iteration— In Zephyr Scale, it sets the Test Cycle iterationtestRunSettings/folder— In Zephyr Scale, it sets the Test Cycle foldertestRunSettings/version— In Zephyr Scale, it sets the Test Cycle version
use default settings
testResultSettings
Specifies additional settings for the created test results. The value can contain placeholders.
testResultSettings/comment— In Zephyr Scale, it sets the test result commenttestResultSettings/environment— In Zephyr Scale, it sets the test result environmenttestResultSettings/iteration— In Zephyr Scale, it sets the test result iterationtestResultSettings/version— In Zephyr Scale, it sets the test result version
use default settings
Setting Placeholders
{br}
a new line
{env:ENVIRONMENT_VARIABLE_NAME}
The content of the environment variable specified (ENVIRONMENT_VARIABLE_NAME in this example)
Last updated
Was this helpful?