Skip to main content

Commands

init

Initializes Checksum in your project. This creates the checksum/ folder containing:
  • checksum.config.ts — project configuration (base URL, browser settings, etc.)
  • playwright.config.ts — Playwright configuration pre-wired for Checksum
  • tsconfig.json — TypeScript configuration for the test directory
  • Login helper — a reusable authentication setup
  • Example test — a starter test file to verify everything works
Prerequisites: Install the runtime package first:

test

Runs your Checksum tests locally using Playwright. Flags
In GitHub Actions and GitLab CI, the repository, branch, and pull-request number are detected automatically from the CI environment — --cksm-auto-heal on its own is usually all you need.
Examples

Affected tests only (--cksm-affected)

Run only the Checksum tests impacted by files changed since a git base ref. The CLI:
  1. Computes changed files between your current checkout and the base ref
  2. Asks Checksum which tests are affected by those files
  3. Runs Playwright with an internal --grep over those test IDs
Flags CI examples
Constraints
  • Cannot be combined with -g / --grep (affected mode sets grep internally)
  • Cannot be combined with --cksm-rerun-failed
  • Shallow clones without enough history may fail — fetch depth must include the merge base with your target ref
Use --cksm-affected-dry-run in CI to log which tests would run before enabling the flag on pull-request workflows.

Re-run non-passing tests (--cksm-rerun-failed)

Re-run only the test files that did not pass in a previous Checksum run (failed or recovered), without executing the full suite.
Checksum fetches per-test results from the API, resolves failing file paths, and passes them to Playwright. If every test in the run passed, the command exits successfully with nothing to run. Constraints
  • Cannot be combined with --cksm-affected or -g / --grep
Example

dotenv

Downloads environment variables from Checksum cloud and saves them to a local .env file. This is useful for syncing secrets and configuration that your tests depend on without committing them to source control. Flags

tsconfig

Adds or updates the tsconfig.json file inside the checksum/ directory. Run this if you need to reset or refresh the TypeScript configuration after an upgrade.

eslint

Adds an ESLint configuration to the checksum/ directory. When run, it will optionally install the required devDependencies:
  • eslint
  • typescript
  • typescript-eslint

show-report

Opens the HTML test report from your most recent local test run in your default browser.

postinstall

Runs post-installation setup. This is typically called automatically after npm install and does not need to be run manually in most cases.

Configuration

The checksum.config.ts file in your checksum/ directory controls project-level settings such as the base URL, browser options, authentication flows, and more. For the full configuration reference, see Repo & CLI Setup.