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

Setting
Description
Default

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.

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.

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

  • 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)

use default settings

testResultSettings

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

use default settings

Setting Placeholders

Placeholder
Description

{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

Last updated