CLI
Команда testplane
Основная команда для запуска тестов.
> testplane --help
Usage: testplane [options] [command] [paths...]
Run tests
Options:
-V, --version output the version number
-c, --config <path> path to configuration file
-b, --browser <browser> run tests only in specified browser
-s, --set <set> run tests only in the specified set
-r, --require <module> require module
--grep <grep> run only tests matching the pattern
--reporter <name> test reporters
--update-refs update screenshot references or gather them if they do not exist ("assertView" command)
--inspect [inspect] nodejs inspector on [=[host:]port]
--inspect-brk [inspect-brk] nodejs inspector with break at the start
--repl [type] run one test, call `browser.switchToRepl` in test code to open repl interface (default: false)
--repl-before-test [type] open repl interface before test run (default: false)
--repl-on-fail [type] open repl interface on test fail only (default: false)
--devtools switches the browser to the devtools mode with using CDP protocol
--local use automatically downloaded browsers and drivers, provided by Testplane
--keep-browser do not close browser session after test completion
--keep-browser-on-fail do not close browser session when test fails
-h, --help output usage information
Например,
npx testplane --config ./config.js --reporter flat --browser firefox --grep name
Опции
Version
Вывести текущую версию testplane
.
testplane --version
Config
Использовать пользовательский файл конфигурации.
testplane --config ./local.testplane.config.ts
Browser
Запускать тесты только в указанном браузере.
testplane --browser chrome
Set
Запускать тесты только в указанном наборе.
testplane --set desktop