### Install Chromatic for Storybook Visual Testing Source: https://context7.com/mojoaxel/awesome-regression-testing/llms.txt Install Chromatic for Storybook-native visual testing. ```bash npm install --save-dev chromatic ``` -------------------------------- ### Install Percy CLI and Playwright Source: https://context7.com/mojoaxel/awesome-regression-testing/llms.txt Install the Percy CLI and Playwright for CI-integrated visual review. ```bash npm install --save-dev @percy/cli @percy/playwright ``` -------------------------------- ### Install Argos CI Playwright Integration Source: https://context7.com/mojoaxel/awesome-regression-testing/llms.txt Install the Argos CI Playwright integration for visual testing. ```bash npm install --save-dev @argos-ci/playwright ``` -------------------------------- ### Install and use BackstopJS for screenshot regression Source: https://context7.com/mojoaxel/awesome-regression-testing/llms.txt BackstopJS is a config-driven tool for screenshot regression testing. It requires installation and initialization before capturing baselines and running tests. ```bash # BackstopJS — config-driven screenshot regression via Puppeteer/Playwright npm install -g backstopjs backstop init # scaffold backstop.json backstop reference # capture baseline screenshots backstop test # diff against baseline; open HTML report on failure ``` -------------------------------- ### Use reg-suit for image comparison and reporting Source: https://context7.com/mojoaxel/awesome-regression-testing/llms.txt reg-suit is a tool for comparing images, storing snapshots, and reporting differences to platforms like GitHub. It requires global installation and initialization for plugin selection. ```bash # reg-suit — compare images, store snapshots, report diff to GitHub npm install -g reg-suit reg-suit init # interactive plugin selection (S3, GCS, GitHub notifier …) reg-suit run # capture → compare → notify ``` -------------------------------- ### Integrate Applitools Eyes with Playwright for visual AI testing Source: https://context7.com/mojoaxel/awesome-regression-testing/llms.txt Applitools Eyes provides AI-powered visual testing through SDK wrappers. This example shows integration with Playwright for opening a test, checking a page, and closing the test. ```bash # Applitools Eyes — AI-powered visual AI via SDK wrappers npm install @applitools/eyes-playwright ``` ```javascript import { Eyes, Target, Configuration, BatchInfo } from '@applitools/eyes-playwright'; const eyes = new Eyes(); await eyes.open(page, 'My App', 'Homepage test'); await eyes.check('Full page', Target.window().fully()); await eyes.close(); ``` -------------------------------- ### Use jest-image-snapshot for inline image snapshot testing Source: https://context7.com/mojoaxel/awesome-regression-testing/llms.txt jest-image-snapshot allows inline image snapshot testing within Jest test suites. It requires installation and extending Jest's expect API. ```bash # jest-image-snapshot — inline snapshot testing inside Jest npm install --save-dev jest-image-snapshot ``` ```javascript # jest.config.js const { toMatchImageSnapshot } = require('jest-image-snapshot'); expect.extend({ toMatchImageSnapshot }); test('hero banner looks correct', async () => { const browser = await puppeteer.launch(); const page = await browser.newPage(); await page.goto('https://example.com'); const screenshot = await page.screenshot(); expect(screenshot).toMatchImageSnapshot({ failureThreshold: 0.01, failureThresholdType: 'percent', }); await browser.close(); }); ``` -------------------------------- ### Configure Lost Pixel for visual regression testing Source: https://context7.com/mojoaxel/awesome-regression-testing/llms.txt Lost Pixel is a holistic visual regression tool that supports full pages and Storybook components. Configuration involves installing the package and defining settings in a config file. ```bash # Lost Pixel — holistic visual regression (full pages + Storybook components) npm install --save-dev lost-pixel ``` ```typescript # lost-pixel.config.ts export default { storybookShots: { storybookUrl: 'http://localhost:6006' }, lostPixelProjectId: 'YOUR_PROJECT_ID', apiKey: process.env.LOST_PIXEL_API_KEY, }; ``` -------------------------------- ### Run Chromatic with Project Token Source: https://context7.com/mojoaxel/awesome-regression-testing/llms.txt Execute Chromatic with your project token. Chromatic builds Storybook, captures stories, and posts status checks to pull requests. ```bash npx chromatic --project-token= ``` -------------------------------- ### Configure Playwright for Argos Screenshots Source: https://context7.com/mojoaxel/awesome-regression-testing/llms.txt Configure Playwright to capture screenshots only on failure when using Argos. Import `argosScreenshot` in your tests. ```typescript import { defineConfig } from '@playwright/test'; import { argosScreenshot } from '@argos-ci/playwright'; export default defineConfig({ use: { screenshot: 'only-on-failure' } }); ``` ```typescript await argosScreenshot(page, 'homepage'); ``` -------------------------------- ### Run Percy Exec with Playwright Tests Source: https://context7.com/mojoaxel/awesome-regression-testing/llms.txt Execute Playwright tests using Percy for CI integration. Ensure PERCY_TOKEN is set as an environment variable. ```bash percy exec -- playwright test ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.