Skip to main content

testivai run

Wraps your test command, connects to Chrome via CDP, and captures visual snapshots.

Usageโ€‹

testivai run "<your-test-command>" [options]

Examplesโ€‹

# Cypress
testivai run "cypress run --browser chrome"

# pytest
testivai run "pytest tests/ -v"

# Jest + Selenium
testivai run "npx jest tests/"

# Maven / JUnit
testivai run "mvn test"

# Robot Framework
testivai run "robot tests/"

# RSpec
testivai run "bundle exec rspec"

How It Worksโ€‹

  1. Starts your test command as a child process
  2. Waits for Chrome to open --remote-debugging-port=9222
  3. Connects via CDP WebSocket
  4. Injects window.testivaiWitness globally
  5. Each witness() call triggers a 5-layer capture
  6. Uploads the batch to TestivAI when tests complete

Optionsโ€‹

FlagDescription
--project <id>Override the project ID from testivai.config.ts
--branch <name>Override the branch name (defaults to current git branch)
--debugPrint verbose CDP connection logs