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": {
      "filePath": "test-result.trx"
    },
    "treatInconclusiveAs": "Failed",
    "testConfiguration": {
      "name": "Windows 10"
    },
    "testRunSettings": {
      "name": "Acceptance test results"
    },
    "testResultSettings": {
      "comment": "BDD results"
    }
  },
  ...
}

Settings

SettingDescriptionDefault

testResult

The test result configuration

  • testResult/filePath — The path of the test result file (e.g. TRX) file or a folder containing multiple test result files.

  • testResult/fileFormat — The format of the test result file. Please check the Compatibility page for supported formats. Invoking the publish-test-result command 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

includeNotExecutedTests

Includes test results that are not executed (outcomes NotExecuted, NotApplicable, NotRunnable, NotImpacted).

false

testConfiguration

Specifies a test configuration within the Azure DevOps project as a target configuration for publishing test results.

  • testConfiguration/name — The name of the test configuration.

  • testConfiguration/id — The ID of the test configuration.

Can be overridden using with a command line option.

uses the single Test Configuration assigned to the Test Suite

testSuite

Specifies a test suite within the Azure DevOps project to publish the test results for.

test cases are not included to a test suite

testSuite/name

The name of the Test Suite. For suites with non-unique names, please use the testSuite/id or testSuite/path setting.

either name, id or path is mandatory

testSuite/id

The ID of the Test Suite as a number.

either name, id or path is mandatory

testSuite/path

The path of the Test Suite from the root of the Test Plan, separated by / (e.g. Ordering/Card Payment).

either name, id or path is mandatory

testSuite/testPlanId

Deprecated, use 'testPlan' instead.

not specified

testSuite/testPlan

The name or ID of the Test Plan to search or create the test suite in, e.g. My Plan or #1234. (Optional, improves performance)

not specified

testRunSettings

Specifies additional settings for the created test run. The value can contain placeholders.

  • testRunSettings/name — The name of the created Test Run. (Default: [load from test result file])

  • testRunSettings/comment — The comment of the created Test Run. (Default: empty)

  • testRunSettings/runType —Sets the run type of the created Test Run. Possible values: manual, automated. (Default: set to automated when synchronization/automation/enabled is true)

use default settings

testResultSettings

Specifies additional settings for the created test results. The value can contain placeholders.

  • testResultSettings/comment — The comment added to the individual test results within the created Test Run. (Default: empty)

use default settings

Setting Placeholders

PlaceholderDescription

{br}

a new line

{env:ENVIRONMENT_VARIABLE_NAME}

The content of the environment variable specified (ENVIRONMENT_VARIABLE_NAME in this example)

{testrun-id}

The ID of the created Test Run

{testrun-url}

The URL of the created Test Run

pageConfiguration referencepagepublish-test-results

Last updated