Skip to main content

Command line

Taqwright ships a single taqwright binary that runs your tests, scaffolds a project, records flows against a device, checks your environment, and serves reports. Invoke any command through your package runner:

npx taqwright <command> [options]

--help and --version are available on every command, so the fastest way to see the live option list for your installed version is:

npx taqwright --help
npx taqwright test --help
npx taqwright --version
A focused surface

The test command exposes the run-time flags below and nothing more. Knobs like trace, video, fullyParallel, and per-project timeouts live in taqwright.config.ts, not on the command line. Playwright-only test flags such as --headed, --debug, --repeat-each, --update-snapshots, and --max-failures are intentionally not surfaced; set the equivalent in config instead.

taqwright test

Run your tests. An optional positional filter narrows which spec files run; it accepts globs (config is auto-discovered as taqwright.config.{ts,mts,js,mjs} in the current directory unless you pass --config).

# Run every test in the configured testDir
npx taqwright test

# Filter test files by glob
npx taqwright test auth/**/*.spec.ts

# Run a single configured project
npx taqwright test --project android

# Run only tests tagged @smoke
npx taqwright test --grep @smoke

# Split the suite into 3 shards and run the first
npx taqwright test --shard 1/3

# List the tests that would run, without running them
npx taqwright test --list

Common options:

OptionDescription
--project <name...>Only run tests from the named project(s). Repeatable.
--grep <regex>Only run tests matching this regex (matches titles and @tags).
--workers <n>Number of parallel workers. Defaults to the run's project workers.
--listList all tests without running them.

All options:

OptionDescription
-c, --config <file>Configuration file. Default: taqwright.config.{ts,mts,js,mjs}.
--reporter <reporter>Reporter to use (e.g. list, html, json, junit).
--grep <regex>Only run tests matching this regex.
--grep-invert <regex>Only run tests NOT matching this regex.
--project <name...>Only run tests from the specified project(s). Repeatable.
--retries <n>Maximum retry count for flaky tests.
--timeout <ms>Test timeout in milliseconds.
--shard <x/n>Shard to run, e.g. 1/3.
--workers <n>Number of parallel workers. Default: the run's project workers.
--listList all tests without running them.
--pass-with-no-testsExit with code 0 when no tests are found.

See Running and debugging for reporters and trace output, and Parallelism for --workers / --shard.

taqwright init

Scaffold a new taqwright project in [dir] (the current directory if omitted). Interactive by default; pass the options below to skip prompts.

# Interactive scaffold in a new folder
npx taqwright init my-app

# Non-interactive: Android project, install deps and the demo app
npx taqwright init my-app --platform android --install --demo-app
OptionDescription
--test-dir <name>Test folder name. Default: tests.
--platform <p>android | ios | both. Default: android.
--installRun npm install after scaffolding.
--no-installSkip running npm install after scaffolding.
-y, --yesOverwrite an existing non-empty directory without prompting.
--install-toolchainAuto-install the Android toolchain after scaffolding (skips the prompt).
--no-install-toolchainSkip the Android-toolchain prompt entirely.
--with-avdAlso create an Android emulator (system image + AVD) when installing the toolchain.
--no-with-avdSkip the emulator prompt.
--demo-appDownload the demo APK so the example test runs out of the box.
--no-demo-appSkip the demo-app prompt entirely.

taqwright inspect

Open the taqwright inspector, a web UI, against a device. Use it to explore the live UI tree and build locators.

npx taqwright inspect --project android
OptionDescription
-c, --config <file>Configuration file. Default: taqwright.config.{ts,mts,js,mjs}.
--project <name>Project to inspect. Default: the first project in config.
--port <n>Preferred local port for the inspector UI. Default: 4280.
--host <host>Host to bind the inspector UI. Default: localhost.
--no-openDo not automatically open the browser.
--recordAuto-start recording the moment Connect succeeds.

taqwright codegen

Open the inspector and auto-start recording on Connect (an alias of inspect --record). Each action you perform appends taqwright source to a generated spec. See Generating tests.

npx taqwright codegen --project android
OptionDescription
-c, --config <file>Configuration file. Default: taqwright.config.{ts,mts,js,mjs}.
--project <name>Project to record against. Default: the first project in config.
--port <n>Preferred local port for the inspector UI. Default: 4280.
--host <host>Host to bind the inspector UI. Default: localhost.
--no-openDo not automatically open the browser.

taqwright devices

List connected devices, simulators, and emulators (Android via adb / emulator, iOS simulators via xcrun simctl on macOS). Takes no options.

npx taqwright devices

taqwright doctor

Check your environment for mobile-development readiness. Exits non-zero if any check fails.

npx taqwright doctor
npx taqwright doctor --json
OptionDescription
--jsonOutput as JSON.

Honours NO_COLOR to suppress ANSI colours in the plain-text output.

taqwright install

Auto-install the Android toolchain (JDK + SDK + Appium) into a managed location, no shell configuration required. Subsequent taqwright commands inherit the managed environment.

npx taqwright install
npx taqwright install --with-avd --print-env
OptionDescription
--forceReinstall even if already provisioned.
--with-avdAlso create a system image + Android emulator (~1 GB).
--print-envAlso print export lines for using the toolchain from your shell.

taqwright merge-reports

Merge blob reports from sharded or parallel runs into a single unified report.

npx taqwright merge-reports ./reports/blob --reporter html
OptionDescription
--reporter <reporter>Reporter to use (e.g. html, list, json, junit).
-c, --config <file>Configuration file.

taqwright show-report

Serve a previously generated HTML report. The report directory defaults to playwright-report.

npx taqwright show-report
npx taqwright show-report ./reports/html --port 9323
OptionDescription
--host <host>Host to serve the report on. Default: localhost.
--port <port>Port to serve the report on. Default: 9323.

Environment variables

VariableEffect
PWDEBUGSet to 0 to make mobile.pause() a no-op, so a stray pause() cannot hang a CI run.
CIConventionally read in your config (e.g. forbidOnly: !!process.env.CI) to tighten behaviour on CI.
NO_COLORDisables ANSI colours in taqwright doctor output.
FORCE_COLORForces coloured output; taqwright sets it for a TTY so colours survive the subprocess.
JAVA_HOMEJDK location. Checked by doctor and used by the toolchain.
ANDROID_HOME / ANDROID_SDK_ROOTAndroid SDK location. Used by doctor, devices, and Appium.
BROWSERSTACK_USERNAME / BROWSERSTACK_ACCESS_KEYCredentials for the BrowserStack provider.
LAMBDATEST_USERNAME / LAMBDATEST_ACCESS_KEYCredentials for the LambdaTest provider.