Command Line Interface
CLI
Basic syntax is:
concordia [dir] [options]where:
A parameter between
[and]means that it is optional.[dir]is the directory that contains your.featurefiles. Whether it is not informed, the tool searches all the subdirectories from the current path.[options]changes how the tool behaves.
You can run concordia --help to see all the command line interface (CLI) options.
You need to use npx before the commands if you opted for a local installation.
Configuration
--config
Indicates a configuration file
Alias: -c
concordia --config /path/to/.concordiarcBy default the configuration file is loaded from the current directory.
--init
Creates a configuration file and optionally installs plug-ins and databases.
concordia --initThis command asks about your preferences. By hitting Enter without giving an answer, it will select the suggested (default) value. You can use Up and Down to navigate the answers and hit Enter to select it. For multiple selection (when available), hitSpace.
By using a configuration file (e.g. .concordiarc) you avoid informing the configured parameters in the console/terminal. For instance, whether plugin is defined in the configuration file, you don't need to inform --plugin anymore.
--save-config
Add CLI parameters to the configuration file
The following example will consider the given directory and add it to the configuration file:
concordia --save-config --directory ./featuresDirectories and files
--directory
Indicates the directory that has
.featureand.testcasefiles.
Alias: -d
When not given, it will search the current directory and all subdirectories recursively.
Example:
concordia --directory ./featuresThis is equivalent to:
concordia ./features--file
Specifies
.featurefiles to consider
Aliases: -f, --files
Files must be separated by comma.
concordia --file "file1.feature,/path/to/file2.feature"Whether the command also informs a directory (e.g. --directory), it searches the files inside the directory. Example:
concordia ./feature --file "f1.feature,f2.feature"The example above will search for ./feature/f1.feature and ./feature/f1.feature.
--ignore
Specify
.featurefiles to ignore when a directory is informed
Alias: -i
Files must be separated by comma.
concordia ./feature --ignore "f3.feature,f4.feature"--no-recursive
Disables recursive search when a directory is informed
concordia ./features --no-recursiveOutput directories
--dir-result
Specifies the directory for test reports and screenshots.
Alias: -O
concordia --dir-result output--dir-script
Specifies the directory for test script files.
Alias: -o
concordia --dir-script testLanguage and locale
--language
Sets the default language to consider.
Alias: -l
The language code must have only 2 characters and needs to be one of the available languages.
concordia --language pt--language-list
Lists the available language codes.
concordia --language-list--locale-list
Lists the available locales.
concordia --locale-listProcessing and output
--just-script
Just generates test scripts
concordia --just-script--just-spec
Just verifies specification files
concordia --just-spec--just-test-case
Just generates test cases
concordia --just-script--just-run
Just execute test script files
concordia --just-run--no-script
Avoids generating test scripts
concordia --no-script--no-spec
Avoids processing specification files
concordia --no-spec--no-test-case
Avoids generating test cases
concordia --no-test-case--no-result
Avoids reading test scripts' results
concordia --no-result--no-run
Avoids running test scripts
concordia --no-run--verbose
Uses a verbose output
concordia --verboseTest script execution
--instances
Number of parallel instances to execute.
Alias: -I
concordia --instances 2--headless
Executes browsers in headless mode.
Alias: -H
concordia --headless--script-file
Sets one or more test script files to execute
Aliases: -F, --script-files
Files must be separated by comma.
concordia --script-file "test1.js,test2.js"--script-grep
Sets a text or regular expression to filter the files to execute
Alias: -G
concordia --script-grep "Sales"--target
Sets target browsers or platforms to execute
Alias: -T
Browser or platforms must be separated by comma.
concordia --target "chrome,firefox,edge"Plug-in
--plugin
Uses the given plug-in (if installed)
Alias: -p
concordia --plugin <plugin>--plugin-about
Shows information about an installed plug-in
Alias: --plugin-info
concordia --plugin-info <plugin>--plugin-install
Installs a plug-in
concordia --plugin-install <plugin>--plugin-list
Lists installed plug-ins
concordia --plugin-list--plugin-serve
Starts a testing server for a plug-in
Alias: -S
concordia --plugin-serve <plugin>The testing server will keep running. Thus, it's a good idea to open a separate terminal/console for it. To stop it later, type Ctrl + C.
--plugin-uninstall
Uninstalls a plug-in
concordia --plugin-uninstall <plugin>Database
--db-install
Installs a database driver
concordia --db-install <database>--db-list
Lists installed databases
concordia --db-list--db-uninstall
Uninstalls a database driver
concordia --db-uninstall <database>Random generation
--random-max-string-size
Maximum random string size to generate, when free values are allowed.
The default value is 500 .
concordia --random-max-string-size 100--random-min-string-size
Minimum random string size to generate, when free values are allowed.
The default value is 0 .
concordia --random-min-string-size 1--random-tries
Random tries to generate invalid values.
When there is a set of valid values and any value different from those in the set is considered an invalid, random generation is used to produce an invalid value. This parameter defines how many tries to take. Usually it gets on the first try.
The default value is 5 .
concordia --random-tries 10--seed
Sets a random seed
concordia --seed="example"Concordia Compiler can use random selection in its algorithms. By default, it generates the seed using the current date and time. Using the same seed makes the algorithms produce the same output (e.g., same values and paths). While that's interesting for reproducing a past behavior, we don't recommend it for finding new defects. Using new seeds, Concordia Compiler will select different test data, test oracles, and test paths over time.
Combination strategies
--comb-data
--comb-invalid
--comb-state
--comb-variant
File formats and extensions
--line-breaker
Sets the character(s) used for breaking lines.
Since by default the line breaker is detected automatically, this command may not be useful for you in most cases.
concordia --line-breaker "\n"Note on line breakers:
Linux uses
"\n"MacOS uses
"\r"Windows uses
"\r\n"
--encoding
Sets the expected file encoding
Alias: -e
The default is utf8. Possible values are:
asciilatin1ucs2orucs-2utf16leorutf-16leutf8orutf-8
concordia --encoding latin1Information
--about
Shows information about the compiler.
concordia --about--help
Shows the available commands
concordia --help--newer
Verify if there is a newer version.
concordia --newer--version
Shows the current version.
concordia --versionLast updated