Skip to main content

How It Works

TestivAI integrates seamlessly with your existing test framework through a simple function call. No complex dependencies required.


Simple Integrationโ€‹

// In your test
testivaiWitness('homepage-test')

// That's it! TestivAI handles the rest

TestivAI captures visual snapshots and analyzes them for regressions, all without modifying your test logic.


Framework Supportโ€‹

TestivAI works with all major test frameworks:

  • Cypress
  • Playwright
  • Selenium
  • WebdriverIO
  • Puppeteer
  • And more...

No framework lock-in - use what works for your team.


Smart Analysisโ€‹

TestivAI's unique 5-layer analysis system catches visual bugs while minimizing false positives:

LayerWhat it ChecksWhy it Matters
1. DOM StructurePage structure integrityDetects missing or broken elements
2. CSS StylesVisual styling differencesCatches color, font, and style regressions
3. Layout PositionsElement positioningFlags layout shifts and misalignments
4. PerceptualWhat users actually seeFilters out meaningless visual noise
5. AI CounselorIntelligent change analysisExplains if changes are bugs or features

This multi-layer approach ensures only meaningful visual changes are flagged for review.


Chrome Setupโ€‹

Chrome must start with --remote-debugging-port=9222. The testivai init wizard adds this automatically for supported frameworks:

  • Cypress: Injects via cypress.config.js setupNodeEvents plugin
  • Selenium: Adds ChromeOptions arg in the generated helper file
  • WebdriverIO: Documents the goog:chromeOptions config
  • Puppeteer: Adds --remote-debugging-port=9222 to puppeteer.launch() args

Baseline Managementโ€‹

First test run    โ†’ Creates baseline
Future runs โ†’ Compared against baseline:
No changes โ†’ Test passes
Changes found โ†’ Analyzed for impact
Needs review โ†’ Flagged for your attention

โ†’ Learn more about baselines and the approval flow