Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Latest commit

 

History

History
84 lines (60 loc) · 4.78 KB

synpress-cli.md

File metadata and controls

84 lines (60 loc) · 4.78 KB
coverY
0

💻 Synpress CLI

npx synpress run

Or by using yarn

yarn synpress run

or

./node_modules/.bin/synpress run

Or add it to package.json

{
  // npm: npm run synpress:run
  // yarn: yarn synpress:run 
  "scripts": {
    "synpress:run": "synpress run"
  }
}

Commands

synpress run

synpress run [options]

Options

Option Description
--browser, -b Run on specified browser (default: chrome)
--config, -c Set configuration values, separate multiple values with a comma
--configFile, -cf Specify a path to *.js file where configuration values are set.
--env, -e Set environment variables, and separate multiple values with commas.
--spec, -s Run only provided spec files
--noExit, -ne Keep runner open after tests finish
--project, -pr Run with specific project path
--quiet, -q Only test runner output in console
--reporter, -r Specify mocha reporter
--reporterOptions, -ro Specify mocha reporter options, separate multiple values with comma
--record, -r [dashboard] Record video of tests running after setting up your project to record.
--key, -k [dashboard] Set record key
--parallel, -p [dashboard] Run recorded specs in parallel across multiple machines.
--group, -g [dashboard] Group recorded tests together under a single run.
--tag, -t [dashboard] Add tags to the dashboard for a test run
--help, -h Output usage information

synpress run --browser <browser-name>

synpress run --browser chrome 

Available options are chrome, chromium, edge, electron, and firefox.

It works the same way the "browser" option works in Cypress.

synpress run --configFile <file-path>

synpress run --configFile synpress.config.js

The "configFile" option accepts the path to the Synpress config file (example) that is required to lunch the tests.