a simple cli for x-test
npm install --save-dev @netflix/x-test-cliThe x-test-cli provides a unified CLI for running browser tests with
different automation tools.
x-test --client=puppeteer --url=http://localhost:8080/test/ --coverage=true--client- Test automation client to use (required)puppeteer- Use Puppeteer with Chrome
--url- URL to the test page (required)--coverage- Enable coverage collection (trueorfalse)--test-name- Filter tests by name using regex pattern (optional)
Run all tests with coverage:
x-test --client=puppeteer --url=http://localhost:8080/test/ --coverage=trueRun specific tests by name:
x-test --client=puppeteer --url=http://localhost:8080/test/ --coverage=false --test-name="should validate"The --test-name argument accepts a regex pattern that matches against the full
test name, including any parent describe block names joined with spaces.
The client outputs TAP Version 14 compliant results and validates the TAP stream internally. If any tests fail, the process will exit with code 1.
@netflix/x-test- Browser-side test runner and utilities@netflix/x-test-cli- Node.js automation via CLI
For browser usage and test writing, see the main @netflix/x-test documentation.