publish-test-results
Publishes local test results to Azure DevOps server as a Test Run, where the results are connected to the synchronized test cases and optionally to a build.
See more details about the command in the "Assembly based execution strategy" section of the Synchronizing automated test cases article.
Options
In addition the the options listed here, all common command line options can also be used.
Option | Description | Default |
---|---|---|
| A local test case condition of scenarios that should be considered for test result publishing (e.g. | not filtered by tags |
| An expression of source file glob patterns that should be considered for test result publishing (e.g. | not filtered by feature files |
| The file path of the test result (.trx, .xml or .json) file to publish or a folder that contains multiple test result files. Multiple paths can be listed, separated by semicolon ( | use from config file |
| The file format of the file to publish. Please check the Compatibility page for supported formats. Invoking the command with | use from config file or detect automatically |
| The name of the Test Run to be created. The value can contain placeholders. | get from test result file |
| Semicolon separated list of file paths that should be attached to the test run additionally. (e.g. | only test result file attached |
| The Azure DevOps Test Configuration name or ID to publish the results for. For specifying an ID, use | use from config file or detect automatically |
| A Test Suite name or ID to publish the test results to. For specifying an ID, use | use from config file |
| The ID of the Test Plan to search the Test Suite in. (e.g. | all Test Plans are scanned through |
| The comment field of the Test Run to be created. The value can contain placeholders. | not specified |
| The comment added to the individual test results within the created test run. Useful if the individual test results are typically browsed not through the Test Run. The value can contain placeholders. | not specified |
| The build ID (e.g. | detect from current build |
| The build number (e.g. | build ID is used |
| The build flavor (e.g. | detect from current build |
| The build platform (e.g. | detect from current build |
| If specified, the published test results will not be associated to the build or release pipeline. This is useful if the Azure DevOps project of the build is different to the project of the Test Cases. See Troubleshooting entry for details. | pipelines are associated |
Examples
Publishes a test result file result.trx
to Azure DevOps:
Publishes a test result file produced by Cucumber Java JUnit execution:
Publishes a test result file result.trx
to Azure DevOps to the configured Test Suite for the Test Configuration Windows 10
:
Publishes test results to a specific Test Suite, where the Test Cases related to the executed scenarios are included. Test Plan ID is also specified for better performance.
Last updated