SpecSync Documentation
Jira
Jira
  • Introduction to SpecSync for Jira
  • 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
      • 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: Automatically link changed Test Cases
      • Customization: Synchronize linked artifact titles
      • 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
      • Excluding scenarios from synchronization
      • Synchronization conflict resolution
    • Test result publishing features
      • Publishing test result files
    • General features
      • Jira authentication options
      • Configuration file
      • Hierarchical configuration files
      • Local test case conditions
      • Configuration wizards
      • SpecSync plugins
    • Customizations
    • Plugin list
  • Licensing
  • Guides
    • What is my Jira server URL?
    • Jira Test Case Management (TCM) solution
    • How to define the local feature-set to be synchronized
    • Filters and scopes
    • How to use SpecSync from build or release pipeline
    • How to upgrade to a newer version of SpecSync
    • How to attach files to test results
    • 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
    • Migrating from SpecSync v1 to v5
  • Changelog
  • Release Model and Roadmap
  • Downloads
  • Reference
    • Command line reference
      • init
      • upgrade
      • push
      • pull
      • publish-test-results
      • version
    • Configuration reference
      • toolSettings
      • local
      • remote
      • jira
      • knownRemotes
      • synchronization
        • push
        • pull
        • links
        • attachments
        • format
        • fieldUpdates
      • hierarchies
      • publishTestResults
      • specFlow
      • customizations
    • Compatibility
    • Older versions
  • Contact
    • SpecSync Support
    • Troubleshooting
    • FAQ
  • Project Website
Powered by GitBook
On this page
  • Getting scenario execution result from your BDD tool
  • Publish test results to Jira
  • Publishing inconclusive test results
  • Merging multiple test result files
  • Custom Test Run and Test Result settings
  • Examples
  • SpecFlow (.NET Core)
  • Cucumber (Java, Maven)
  • Publish using a specific environment with a custom description

Was this helpful?

  1. Features
  2. Test result publishing features

Publishing test result files

PreviousTest result publishing featuresNextGeneral features

Last updated 4 months ago

Was this helpful?

In order to turn the Test Cases in Jira into a real living documentation it is essential to register the execution results of the Test Cases. Having the Test Case execution results registered in Jira might be also important as part of the traceability requirements.

You can publish scenario execution results (test results) to Jira with SpecSync using the publish-test-result command that works with many BDD tool and platform including SpecFlow, Reqnroll, Cucumber and PyTest (Check page for the full list).

This documentation page describes in detail the concept for publishing test results with SpecSync. The complete reference guide of the command line options can be found in the page. The configuration settings for test result publishing are in the .

The section below shows a few concrete examples. A simple usage of the command could be as simple as this:

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

The guide contains details about how to integrate the publish-test-results command to a build or release pipeline.

SpecSync operations, including the publish-test-results command supports "dry-run" mode using the --dryRun command line option. In dry-run mode, no change is made neither to Jira nor to the feature files, so you can test the impact of an operation without making an actual change.

Getting scenario execution result from your BDD tool

The automation source of the Test Cases are provided by the BDD scenarios and the automation solution implemented for them. The automation solution might use different tools (SpecFlow, Reqnroll, Cucumber, PyTest, etc.) and might run on different platforms (e.g. .NET, Java or Python).

SpecSync uses a concept that works with different tools and platforms: execute the scenarios as usual with their standard tooling and save the test results into a test result file of their native test result format. SpecSync understands many test result file formats and how they represent the scenario results and able to match them to the Test Cases, synchronized earlier with a push command.

The page contains the currently supported BDD tools and test result file formats. Please if your tool is not in the list and we are happy to provide support for that. You can also support custom test result file formats with a .

The exact way how you can get test result files depends on the test runner tool and the BDD framework you use. For example for .NET Reqnroll test projects the test results can be saved into a TRX file by providing the --logger trx;logfilename=<your-trx-file-name>.trx option for the dotnet test command.

For the SpecSync publish-test-results command, the path of the test result file can be specified using the --testResultFile command line option. If the test result file is not a TRX file, you also have to specify the file format using the --testResultFileFormat option (see for possible values).

The section below shows how some of the most commonly used BDD frameworks and platforms can be used.

Publish test results to Jira

The representation of the test results in Jira depends on the Test Case Management solution used.

TCM solution
Test result representation

Jira TCM Customization

Currently not supported.

Zephyr Scale

SpecSync creates a new Test Cycle during test result publishing with all test results that were included in the test result file(s). For scenario outlines a test result will be created with multiple test script result each of them representing a scenario outline example.

Additional fields of the Test Cycle and the individual Test Results can be specified using the --testRunSetting and the --testResultSetting options. Currently for the Test Cycle the name, description, iteration, folder, version fields and for the Test Result, the comment and the environment fields can be set.

Publishing inconclusive test results

Some test execution frameworks report skipped scenarios as Inconclusive. Publishing them as inconclusive result (that is a kind of failure) would make the overall test outcome and the detail statistics invalid.

My setting the publishTestResults/treatInconclusiveAs setting in the configuration file, you can map this result to another value, e.g. NotExecuted.

Merging multiple test result files

You can also specify multiple test result files. In this case SpecSync will merge the results and publish them as a single Test Run.

The --testResultFile command line option allows specifying multiple files, separated by a semicolon (;).

Multiple test results files can also be specified by specifying a folder name. In this case SpecSync will scan through the folder and uses all files that are supported by the specified format setting (e.g. all TRX files).

Custom Test Run and Test Result settings

Examples

SpecFlow (.NET Core)

The following example shows how to run .NET Core SpecFlow tests using the dotnet test command and publish the test result file (bddtestresults.trx) to the default Test Configuration.

dotnet test --logger trx;logfilename=bddtestresults.trx
dotnet specsync publish-test-results --testResultFile bddtestresults.trx

Cucumber (Java, Maven)

The following example shows how to run Cucumber Java tests using Maven and publish the test result file to the default Test Configuration.

mvn test
<SPECSYNC-FOLDER>/SpecSync4Jira publish-test-results --testResultFile bddtestresults.xml --testResultFileFormat cucumberJavaJUnitXml

Publish using a specific environment with a custom description

The following example shows how to publish the results to a specific Environment using Zephyr Scale. In this case the tests are executed both with Chrome and Firefox, therefore we created two Environments (Chrome and Firefox).

We executed the tests for Chrome and saved the results to a file bddresults-chrome.trx. After that publishing the results to the Chrome configuration can be done with

dotnet specsync publish-test-results -r bddresults-chrome.trx --testResultSetting "environment=Chrome" --testRunSetting "description=Chrome executions"

The Test Runs and the individual Test Results within that can have additional settings (e.g. comment) that can be specified. These settings can be specified from the (e.g. --testRunSetting) or using the publishTestResults/testRunSettings and publishTestResults/testResultSettings .

In the specified values, you can also use different placeholders, e.g. the {br} placeholder to include a new line. For the complete list of placeholders that can be used, please check the .

When running mvn test the test result file is saved to a file name that matches to your package name under the target/surefire-reports folder, e.g. target/surefire-reports/TEST-eu.specsolutions.calculator.CucumberTest.xml. Check the for details.

The Test Suite in this case is the Test Suite that the scenarios are synchronized to (BDD Scenarios). In this example we use the to invoke the command, but the same would work with the other too.

command line
configuration settings
Maven Surefire Report Plugin documentation
SpecSync native binaries
installation options
publish-test-results reference
publishTestResults configuration section
Use SpecSync from build or release pipeline
contact us
SpecSync plugin
Examples
Examples
Compatibility
Compatibility
Compatibility
reference