Running tests with command-line settings
As we already learned in Chapter 3, Setting Up the Environment, when you trigger tests by executing the testcafe
command, TestCafe reads settings from the .testcaferc.json
configuration file, if this file exists, and then applies the settings from the command line on top of it. Command-line settings overrule values from the configuration file if they differ. TestCafe outputs information about each overridden property to the console.
Note
If the browsers
and src
properties are provided in the configuration file, you can omit them in the command line.
Let's review some of the main command-line settings that can be used with the testcafe
command while launching the tests:
--help
, or-h
, outputs a list of all the available command-line options (https://devexpress.github.io/testcafe/documentation/reference/command-line-interface.html#-h---help). Open any shell and run the following:$ npx testcafe --help
--quarantine-mode...