SpecSync Documentation
Getting StartedConfigurationGuidesDownloads
Azure DevOps
Azure DevOps
  • Introduction to SpecSync for Azure DevOps
  • Getting started
    • Getting started using SpecFlow
    • Getting started using Cucumber or other Gherkin-based BDD tool
  • Installation & Setup
    • Install as .NET tool
    • Install as .NET Console App
    • Install as native binaries for Linux or macOS
    • Install as Docker image
    • Setup and Configure
  • Features
    • Push features
      • Pushing scenario changes to Test Cases
      • Configuring the format of the synchronized test cases
      • Synchronizing Scenario Outlines
      • Add new Test Cases to an Area or an Iteration
      • Mark Test Cases as Automated
      • Setting Test Case state on change
      • Update Test Case fields
      • Attach files to Test Cases using tags
      • Customization: Setting Test Case fields with default values
      • Customization: Update custom Test Case fields on push
      • Customization: Ignoring marked Test Case steps
      • Customization: Ignoring Test Case Tags
      • Customization: Ignore non-supported local tags
      • Customization: Mapping tags
      • Customization: Synchronizing scenarios from feature branches
      • Customization: Reset Test Case state after change
      • Customization: Automatically link changed Test Cases
      • Customization: Synchronize linked artifact titles
      • Customization: Add Test Cases to Suites
      • Customization: Do not synchronize title
    • Pull features
      • Pulling Test Case changes to local scenarios
    • Common synchronization features
      • Configuration key
      • Remote scope
      • Linking Work Items using tags
      • Synchronizing Test Case hierarchies using Test Suites
      • Include synchronized Test Cases to a Test Suite (deprecated)
      • Excluding scenarios from synchronization
      • Synchronization conflict resolution
      • Re-link scenarios to new Test Cases
    • Test result publishing features
      • Publishing test result files
      • Support for Azure DevOps Test Plan / Test Suite based test execution
      • Customization: Publishing test results to multiple Test Suites
    • General features
      • Azure DevOps authentication options
      • Configuration file
      • Hierarchical configuration files
      • Local test case conditions
      • Configuration wizards
      • SpecSync plugins
    • Customizations
    • Plugin list
  • Licensing
  • Guides
    • What is my Azure DevOps project URL?
    • How to define the local feature-set to be synchronized
    • Filters and scopes
    • How to synchronize automated test cases
    • How to use SpecSync from build or release pipeline
    • How to publish test results from pipelines using the VSTest task
    • How to use the SpecSync Azure DevOps pipeline tasks
    • How to link GitHub pull requests
    • How to upgrade to a newer version of SpecSync
    • How to attach files to test results
    • Using SpecSync with SpecFlow+
    • Using SpecSync with Cucumber
    • Using SpecSync with Cypress
    • Using SpecSync with Postman
    • Using SpecSync with TestNG
    • Using SpecSync on macOS or Linux
    • Using SpecSync inside a Docker container
    • How to handle Test Cases of multiple parallel application releases
    • Migrating from SpecSync v3 to v5
    • Migrating from SpecSync v2 to v3
    • Migrating from SpecSync v1 to v2
  • Changelog
  • Release Model and Roadmap
  • Downloads
  • Reference
    • Command line reference
      • init
      • upgrade
      • push
      • pull
      • publish-test-results
      • re-link
      • version
    • Configuration reference
      • toolSettings
      • local
      • remote
      • knownRemotes
      • synchronization
        • push
        • pull
        • automation
        • state
        • areaPath
        • iterationPath
        • links
        • attachments
        • format
        • fieldUpdates
      • hierarchies
      • publishTestResults
      • specFlow
      • reqnroll
      • customizations
    • Compatibility
    • Older versions
  • Contact
    • SpecSync Support
    • Troubleshooting
    • FAQ
  • Project Website
Powered by GitBook
On this page
  • Options
  • Examples

Was this helpful?

  1. Reference
  2. Command line reference

publish-test-results

PreviouspullNextre-link

Last updated 17 days ago

Was this helpful?

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.

To read more about publishing test results see the page. Please also check the related for the publish-test-results command.

See more details about the command in the "Assembly based execution strategy" section of the article.

Options

In addition the the options listed here, all can also be used.

Option
Description
Default

--tagFilter

not filtered by tags

--sourceFileFilter

not filtered by feature files

-r|--testResultFile <FILE‑PATH>

use from config file

-f|--testResultFileFormat <FORMAT>

use from config file or detect automatically

--runName <NAME>

get from test result file

--runComment <RUN‑COMMENT>

not specified

--testResultComment <RESULT‑COMMENT>

not specified

--attachedFiles <FILE‑LIST>

Semicolon separated list of file paths that should be attached to the test run additionally. (e.g. error1.png;error2.log) Wildcards are currently not supported.

only test result file attached

-c|--testConfiguration <CONFIGURATION>

The Azure DevOps Test Configuration name or ID to publish the results for. For specifying an ID, use #1234 format.

use from config file or detect automatically

--testSuite <SUITE‑NAME‑OR‑ID>

A Test Suite name or ID to publish the test results to. For specifying an ID, use #1234 format. (e.g. My Suite or #1234)

use from config file

--testPlanId <PLAN‑ID>

The ID of the Test Plan to search the Test Suite in. (e.g. 123)

all Test Plans are scanned through

--buildId <BUILD‑ID>

The build ID (e.g. 345) of the build the test result was created for. To prevent detecting build from build you can specify the --disablePipelineAssociation option (or set the --buildId option to an empty value before v3.3.3).

detect from current build

--buildNumber <BUILD‑NUMBER>

The build number (e.g. 20200119.1) of the build the test result was created for. Should be specified when build ID is not known.

build ID is used

--buildFlavor <FLAVOR>

The build flavor (e.g. Debug) of the build the test result was created for. Can only be specified if either --buildNumber or --buildId is specified.

detect from current build

--buildPlatform <PLATFORM>

The build platform (e.g. x86) of the build the test result was created for. Can only be specified if either --buildNumber or --buildId is specified.

detect from current build

--disablePipelineAssociation

pipelines are associated

Examples

Publishes a test result file result.trx to Azure DevOps:

dotnet specsync publish-test-results --testResultFile result.trx

Publishes a test result file produced by Cucumber Java JUnit execution:

dotnet specsync publish-test-results --testResultFile cucumber-result.xml --testResultFileFormat CucumberJavaJUnitXml

Publishes a test result file result.trx to Azure DevOps to the configured Test Suite for the Test Configuration Windows 10:

dotnet specsync publish-test-results --testResultFile result.trx --testConfiguration "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.

dotnet specsync publish-test-results --testPlanId 345 --testSuite "Ordering Tests" --testResultFile result.trx --testConfiguration "Windows 10"

A of scenarios that should be considered for test result publishing (e.g. @current_sprint and @done). See for details.

An expression of source file that should be considered for test result publishing (e.g. Folder1/**/*.feature). See for details.

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 (;). Wildcards are supported using the syntax.

The file format of the file to publish. Please check the page for supported formats. Invoking the command with ? as format will list all supported format as well.

The name of the Test Run to be created. The value can contain .

The comment field of the test run to be created. The value can contain .

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 .

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 for details.

Command line reference
publishTestResults
local test case condition
Filters and scopes
glob patterns
Filters and scopes
glob pattern
Publishing test result files
configuration file reference
Synchronizing automated test cases
common command line options
Compatibility
Troubleshooting entry
placeholders
placeholders
placeholders