Command Line Interface
CLI
Basic syntax is:
1
concordia [dir] [options]
Copied!
where:
    A parameter between[ and ] means that it is optional.
    [dir] is the directory that contains your .feature files. 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
1
concordia --config /path/to/.concordiarc
Copied!
By default the configuration file is loaded from the current directory.

--init

Creates a configuration file and optionally installs plug-ins and databases.
1
concordia --init
Copied!
This 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.
CLI options take precedence over values from configuration files.

--save-config

Add CLI parameters to the configuration file
The following example will consider the given directory and add it to the configuration file:
1
concordia --save-config --directory ./features
Copied!

Directories and files

--directory

Indicates the directory that has .feature and .testcase files.
Alias: -d
When not given, it will search the current directory and all subdirectories recursively.
We strongly recommend to use it or set it in the configuration file.
Example:
1
concordia --directory ./features
Copied!
This is equivalent to:
1
concordia ./features
Copied!
You can use it with --no-recursive to disable recursive search.

--file

Specifies .feature files to consider
Aliases: -f, --files
Files must be separated by comma.
1
concordia --file "file1.feature,/path/to/file2.feature"
Copied!
Whether the command also informs a directory (e.g. --directory), it searches the files inside the directory. Example:
1
concordia ./feature --file "f1.feature,f2.feature"
Copied!
The example above will search for ./feature/f1.feature and ./feature/f1.feature.

--ignore

Specify .feature files to ignore when a directory is informed
Alias: -i
Files must be separated by comma.
1
concordia ./feature --ignore "f3.feature,f4.feature"
Copied!

--no-recursive

Disables recursive search when a directory is informed
1
concordia ./features --no-recursive
Copied!

Output directories

The directories will be used by a plug-in. We strongly recommend that you specify them in a configuration file.

--dir-result

Specifies the directory for test reports and screenshots.
Alias: -O
1
concordia --dir-result output
Copied!

--dir-script

Specifies the directory for test script files.
Alias: -o
1
concordia --dir-script test
Copied!

Language 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.
1
concordia --language pt
Copied!

--language-list

Lists the available language codes.
1
concordia --language-list
Copied!

--locale-list

Lists the available locales.
1
concordia --locale-list
Copied!

Processing and output

--just-script

Just generates test scripts
1
concordia --just-script
Copied!

--just-spec

Just verifies specification files
1
concordia --just-spec
Copied!

--just-test-case

Just generates test cases
1
concordia --just-script
Copied!

--just-run

Just execute test script files
1
concordia --just-run
Copied!

--no-script

Avoids generating test scripts
1
concordia --no-script
Copied!

--no-spec

Avoids processing specification files
1
concordia --no-spec
Copied!

--no-test-case

Avoids generating test cases
1
concordia --no-test-case
Copied!

--no-result

Avoids reading test scripts' results
1
concordia --no-result
Copied!

--no-run

Avoids running test scripts
1
concordia --no-run
Copied!
Use -x to combine --no-run and --no-result
1
concordia -x
Copied!

--verbose

Uses a verbose output
1
concordia --verbose
Copied!

Test script execution

These parameters require a plugin (--plugin) and some plug-ins may not support them.

--instances

Number of parallel instances to execute.
Alias: -I
1
concordia --instances 2
Copied!

--headless

Executes browsers in headless mode.
Alias: -H
1
concordia --headless
Copied!

--script-file

Sets one or more test script files to execute
Aliases: -F, --script-files
Files must be separated by comma.
1
concordia --script-file "test1.js,test2.js"
Copied!

--script-grep

Sets a text or regular expression to filter the files to execute
Alias: -G
1
concordia --script-grep "Sales"
Copied!

--target

Sets target browsers or platforms to execute
Alias: -T
Browser or platforms must be separated by comma.
1
concordia --target "chrome,firefox,edge"
Copied!

Plug-in

You can omit the prefix concordialang- from plug-in names. For instance, concordialang-codeceptjs-playwright becomescodeceptjs-playwright.

--plugin

Uses the given plug-in (if installed)
Alias: -p
1
concordia --plugin <plugin>
Copied!
You can use it with -x to avoid running test scripts and reading their output:
1
concordia -p <plugin> -x
Copied!

--plugin-about

Shows information about an installed plug-in
Alias: --plugin-info
1
concordia --plugin-info <plugin>
Copied!

--plugin-install

Installs a plug-in
1
concordia --plugin-install <plugin>
Copied!

--plugin-list

Lists installed plug-ins
1
concordia --plugin-list
Copied!

--plugin-serve

Starts a testing server for a plug-in
Alias: -S
1
concordia --plugin-serve <plugin>
Copied!
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
1
concordia --plugin-uninstall <plugin>
Copied!

Database

See Using Databases for the list of available databases.

--db-install

Installs a database driver
1
concordia --db-install <database>
Copied!

--db-list

Lists installed databases
1
concordia --db-list
Copied!

--db-uninstall

Uninstalls a database driver
1
concordia --db-uninstall <database>
Copied!

Random generation

--random-max-string-size

Maximum random string size to generate, when free values are allowed.
The default value is 500 .
1
concordia --random-max-string-size 100
Copied!

--random-min-string-size

Minimum random string size to generate, when free values are allowed.
The default value is 0 .
1
concordia --random-min-string-size 1
Copied!

--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 .
1
concordia --random-tries 10
Copied!

--seed

Sets a random seed
1
concordia --seed="example"
Copied!
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.
You can also set the algorithms to use, in order to avoid random selection. Full combination (therefore full coverage of the requirements) can be achieved and it is recommend for complete checking before a new release. However, it may take some time to execute.

Combination strategies

--comb-data
--comb-invalid
--comb-state
--comb-variant

File formats and extensions

You probably don't need to use them, unless you're facing problems to read files.

--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.
1
concordia --line-breaker "\n"
Copied!
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:
    ascii
    latin1
    ucs2 or ucs-2
    utf16le or utf-16le
    utf8 or utf-8
1
concordia --encoding latin1
Copied!

Information

--about

Shows information about the compiler.
1
concordia --about
Copied!

--help

Shows the available commands
1
concordia --help
Copied!

--newer

Verify if there is a newer version.
1
concordia --newer
Copied!

--version

Shows the current version.
1
concordia --version
Copied!
Last modified 6mo ago