Skip to content

Netflix/x-test-cli

Repository files navigation

@netflix/x-test-cli

a simple cli for x-test

Installation

npm install --save-dev @netflix/x-test-cli

Command Line Usage

The x-test-cli provides a unified CLI for running browser tests with different automation tools.

Basic Usage

x-test --client=puppeteer --url=http://localhost:8080/test/ --coverage=true

Arguments

  • --client - Test automation client to use (required)
    • puppeteer - Use Puppeteer with Chrome
  • --url - URL to the test page (required)
  • --coverage - Enable coverage collection (true or false)
  • --test-name - Filter tests by name using regex pattern (optional)

Examples

Run all tests with coverage:

x-test --client=puppeteer --url=http://localhost:8080/test/ --coverage=true

Run specific tests by name:

x-test --client=puppeteer --url=http://localhost:8080/test/ --coverage=false --test-name="should validate"

Test Filtering

The --test-name argument accepts a regex pattern that matches against the full test name, including any parent describe block names joined with spaces.

TAP Output

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.

Browser vs CLI Packages

  • @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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published