Install the CLI
To get started with the CLI, please install it with
Once installed, you'll need to provide the CLI with a
testingbot.json configuration file.
This file contains various settings, including the path to your Cypress tests.
To generate a configuration file, you can use the
Please add the
secret you obtained from the TestingBot member dashboard in the
Next, please supply
cypress_proj_dir with the path to the folder that contains the
As an example, you can use the Cypress Kitchen Sink Example.
Before you can run your tests, you need to specify on which browser (version) and platform you'd like to test. At this time, only the following platforms are supported (we are working on adding more):
- macOS Catalina
- macOS Mojave
- Windows 10
You can specify the browsers you want to use in the
You are now ready to run your Cypress tests on TestingBot.
Run the following command:
This will zip your Cypress tests, upload them to TestingBot and instruct TestingBot to start running the tests on the platform(s) you specified in the configuration file. The CLI will then display a link to view a live feed of your Cypress tests and will return realtime logs of the Cypress client running on TestingBot.
Once the tests have finished running, the CLI will exit with code 1 (failure) or 0 (success).
As an example, you can use cypress-example-kitchensink
These are the steps you need to follow to run the example on TestingBot:
Clone the kitchensink repo and install the dependencies:
Start the kitchensink example:
Add the local port used by kitchensink (8080) to the
local_portsarray, this way the TestingBot VMs can access the port.
cypress_project_dirto point to the path where you installed the example.
- Run the tests:
- Test results will appear in your console and on the TestingBot dashboard.
Several options are available in the
cypress_project_dir: this needs to be specified and is the directory (absolute path) where your
cypress.jsonfile is located.
build_name: this will set the build name on TestingBot. All Cypress tests will be grouped under this name.
npm_dependencies: you can list the NPM dependencies that your Cypress project requires here:
package_config_options: the config options for each of the npm dependencies you specified:
start_tunnel: should the CLI start a TestingBot Tunnel to access websites on your local computer/network?
local_ports: an array of ports that Cypress is using on your local computer. Use this in combination with
start_tunnel = trueto run tests from your local computer or network.
realTimeLogs: should the CLI display a real-time feed of the Cypress logs?
tunnel_settings: add additional Tunnel options to the TestingBot tunnel process.
The CLI supports various Environment Variables:
You can use
TESTINGBOT_SECRETto pass the TestingBot credentials to the CLI.
If you set
TESTINGBOT_CI=1then the CLI will output the
TestingBotSessionIDwhich can be used in combination with one of our CI plugins.