This guide lists the QA Wolf commands you can run in the CLI.

Use environment variables

You can use environment variables when running CLI commands.

For example, run the following to save artifacts of your test with QAW_ARTIFACT_PATH:

QAW_ARTIFACT_PATH=/tmp/artifacts npx qawolf create

npx qawolf --help

See all commands and options.

npx qawolf create url [name][...options]

Create a browser test on a Chromium browser.


[--device name] (string): Emulate a supported device. See this guide to learn more. Default: No device emulation.

[--statePath file] (string): File where state data (cookies, localStorage, sessionStorage) is saved. If provided, the state will be set before you create your test. Default: null.

url (string): Visit this URL to begin your test.

[name] (string): The name of your test file. The file will be saved at ${rootDir}/${name}.test.js. Default: the hostname of the provided URL.


Create a browser test on, emulating an iPhone 7:

npx qawolf create --device="iPhone 7"

Create a browser test on, saving it at .qawolf/myTest.test.js:

npx qawolf create myTest

Create a brower test on, loading state data from .qawolf/state/admin.json:

npx qawolf create --statePath=./.qawolf/state/admin.json

npx qawolf edit name

Edit an existing test.


name (string): A string that matches exactly one test file name.

[--watch] (string): Watch file for changes and rerun when something changes.


Edit the test saved at .qawolf/myTest.test.js:

npx qawolf edit myTest

Edit the test saved at .qawolf/myReallySuperLongTestName.test.js (assuming there are no other tests with names that match TestName):

npx qawolf edit TestName

When using edit mode, you can add steps to an existing test by calling the qawolf.create method in your test code. The test will pause when qawolf.create is called, allowing you to use the browser to generate additional code.

// ...
test('myTest', async () => {
await page.goto('');
// previous test steps
// ...
// call qawolf.create to add steps
await qawolf.create();

npx qawolf test [name][...options]

Run your test(s) with Jest. Tests run on a Chromium browser by default.


[--all-browsers] (boolean): Run your test(s) on Chromium, Firefox, and WebKit.

[--firefox] (boolean): Run your test(s) on Firefox.

[--headless] (boolean): Run your test(s) in headless mode.

[--webkit] (boolean): Run your test(s) on WebKit.

[name] (string): The name of the test file to run. For example, passing myTestName will run the ${rootDir}/tests/myTestName.test.js file. Default: run all tests.

[...jestOptions] (Jest CLI Options): Options for the Jest CLI.


Run all tests:

npx qawolf test

Run the test saved at .qawolf/myTest.test.js:

npx qawolf test myTest

Run the test saved at .qawolf/myTest.test.js on Chromium, Firefox, and WebKit:

npx qawolf test --all-browsers myTest

Run all tests in headless mode:

npx qawolf test --headless

Use the --runInBand Jest CLI option to run tests serially:

npx qawolf test --runInBand

npx qawolf howl