Command line reference
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 SpecSync configuration file (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 WindowsSpecSync4Jira <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 Installation & Usage 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.
Examples
Invoking the following command displays 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
Common command line options
The following command line options are available for all commands that require established configuration (push
, pull
, publish-test-results
).
The --ignoreCertificateErrorsForThumbprint
option is planned for a future version of SpecSync for Jira. Please check the Roadmap for details.
Override configuration setting from command line
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 hierarchical configuration files.
The following example overrides the user name setting in the remote
configuration section (equivalent to the exposed --user
option).
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 support if you are unsure about how to solve a particular synchronization requirement with SpecSync.
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 thetagPrefix
setting of the firstlink
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 thetagPrefix
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 thetagPrefix
setting of the lastlink
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:
Get help about command line options for push
command:
Synchronize local changes to Jira and save execution log to a file log.txt
:
Last updated