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
  • Exit Codes
  • Examples
  • Commands
  • Common command line options
  • Override configuration setting from command line
  • Examples

Was this helpful?

  1. Reference

Command line reference

PreviousDownloadsNextinit

Last updated 1 month ago

Was this helpful?

SpecSync functions are provided through the command line tool. To use the command line tool open a command window or bash shell and run SpecSync followed by a command and appropriate options. The options and further configuration have to be specified in a (by default specsync.json). The SpecSync command line tool is normally invoked from the folder where the configuration file of the project is saved.

Running SpecSync might require you to use different executable depending on the installation.

  • dotnet specsync <COMMAND> [options] — when SpecSync is installed as a platform independent .NET tool (recommended)

  • SpecSync4Jira.exe <COMMAND> [options] — when you use the .NET Framework interface through the SpecSync.Jira.Console NuGet package on Windows

  • SpecSync4Jira <COMMAND> [options] — when you use the native binaries for Linux or MacOS

The available commands and the options are the same for all usage, please check the page for further information about usage options. In the command line reference we generally use the .NET tool usage syntax.

Exit Codes

The command line tool terminated with a specific exit code depending on the execution result.

Exit Code
Description

0

Completed

5

Warnings (use --zeroExitCodeForWarnings to use zero exit code)

10

Failed with a synchronization error

90

Failed with an unhandled error

100

Failed with a configuration error

Examples

Invoking the following command displays SpecSync version.

dotnet specsync version

SpecSync collects anonymous error diagnostics and statistics. Neither user nor machine names, nor Jira URLs, nor test case & other issue names nor IDs are collected! This can be disabled with the --disableStats parameter.

Commands

Command
Description

Initializes SpecSync configuration

Upgrades SpecSync configuration after a SpecSync version upgrade

Pushes changes of the scenarios on the local repository to the Jira server. This includes linking of new scenarios to new test cases (link) and updating test cases of linked scenarios (update).

Pulls changes from Jira server to the local repository. This by default includes creation of new scenarios from unlinked test cases (create) and changing scenarios of linked test cases (change).

Publishes local test results to Jira server.

help

Displays help information or help for a command.

version

Displays SpecSync version and license information.

Common command line options

The following command line options are available for all commands that require established configuration (push, pull, publish-test-results).

Option
Description
Default

<CONFIG‑FILE‑PATH>

The path of the SpecSync configuration file, absolute path or relative to the current folder, e.g. MyProject.Specs\specsync.json. Has to be specified as a last parameter.

use specsync.json from the current folder

--user <USER‑NAME>

use from config file or interactive prompt

--password <PASSWORD>

use from config file or interactive prompt

--ignoreCertificateErrorsForThumbprint

The thumbprint of the server certificate that should be treated as trusted. It is recommended to install trusted certificates on the operating system instead of using this setting.

SSL is verified by the OS

--license <LICENSE‑FILE‑PATH>

use from config file or specsync.lic

--disableStats

If specified, SpecSync will not collect anonymous error diagnostics and statistics. Overrides toolSettings/disableStats setting of the configuration file.

false

-v, --verbose

If specified, diagnostic information will be added to the output. Overrides toolSettings/outputLevel setting of the configuration file.

false

--log <LOG-FILE>

If specified, the output will also be saved to a log file.

no log file is written

--zeroExitCodeForWarnings

If specified, the command line tool will terminate with 0 exit code even in case of warnings.

Non-zero exit code is returned for warnings

--configOverride

No configuration setting overrides

--dryRun

If specified, the command will be performed, but no actual change is made either to Jira or to the local test files (feature files). This option is useful for testing the impact of an operation without making an actual change.

Normal mode

Override configuration setting from command line

The following example overrides the user name setting in the remote configuration section (equivalent to the exposed --user option).

dotnet specsync push --configOverride "remote/user=myusername"

In order to override multiple configuration setting, the --configOverride option can be used multiple times or you can specify multiple settings separated by a semicolon (;).

The value for the --configOverride option is a configuration setter that has to follow a certain format: <path>=<value>, where

  • <path> is the path of the configuration setting, e.g. remote/testSuite/name. For overriding values of list (array) settings, you can use the following path values:

    • <array-path>[<index>] -- overrides a setting at a specific index. E.g. synchronization/links[0]/tagPrefix can be used to set or override the tagPrefix setting of the first link element.

    • <array-path>[] -- adds a new element to the end of the list. E.g. synchronization/links[]/tagPrefix can be used to add a new link element and set the tagPrefix setting.

    • <array-path>[-<index>] -- overrides a setting at a specific index backwards (-1 is the last element, -2 is the one before last, etc.). E.g. synchronization/links[-1]/tagPrefix can be used to set or override the tagPrefix setting of the last link element. This setting can also be used in combination with the [] syntax. E.g. the following two setting adds a new link elements and sets two settings of it: synchronization/links[]/tagPrefix=bug;synchronization/links[-1]/relationship=tests

  • <value> is the new value of the setting. The option recognizes numbers, booleans (true/false) and arbitrary strings.

Examples

Display SpecSync version:

dotnet specsync version

Get help about command line options for push command:

dotnet specsync help push

Synchronize local changes to Jira and save execution log to a file log.txt:

dotnet specsync push --log log.txt

The Jira user name or (PAT). Overrides remote/user setting of the configuration file. See for details.

The password for the Jira user. Overrides remote/password setting of the configuration file. See for details.

The path to the license file; can be relative to the project folder. Overrides toolSettings/licensePath setting of the configuration file. See for details. (Default: use from config file or specsync.lic)

Can be used to override configuration file settings. This option can be used multiple times. See for details.

The --ignoreCertificateErrorsForThumbprint option is planned for a future version of SpecSync for Jira. Please check the for details.

With the --configOverride option any configuration file setting can be overridden even if there is no dedicated command line option for that. Using this option can be used as a backup solution to handle special cases. As an alternative to this option, you can also consider using .

Most of the configuration settings changes the synchronization behavior and therefore changing them might cause a modification for many Test Cases. Therefore it is generally not recommended to use the --configOverride option. Please contact if you are unsure about how to solve a particular synchronization requirement with SpecSync.

SpecSync configuration file
Installation & Usage
Roadmap
support
init
upgrade
push
pull
publish-test-results
personal access token
Jira authentication options
Jira authentication options
Licensing
Override configuration setting from command line
hierarchical configuration files