percy-visual-regression-testing
БесплатноБез исполняемых скриптовНе проверенUse when visual regression tests run on BrowserStack Percy: @percy/cli with the Playwright, Cypress, Selenium or Storybook SDK, percy exec, viewports, masks…
от testland★ 18 звёзд на GitHubОб этом скилле
percy-visual-regression-testing
Overview
Percy is BrowserStack's visual testing platform. The integration shape is
two-layered: the CLI (@percy/cli) plus a framework SDK
(@percy/playwright, @percy/cypress, @percy/selenium,
@percy/storybook, etc. - the Percy CLI README lists the
available SDKs as Playwright, Cypress, Selenium, Storybook, Puppeteer,
Appium, plus framework-specific wrappers like Ember, Gatsby, Jekyll, and
a custom SDK option).
The CLI starts a local snapshot server, the SDK calls
percySnapshot(page, name) from inside your tests, and the build appears
in the Percy UI for baseline review.
When to use
- The repo already uses Percy (presence of
@percy/*packages,.percy.yml, orPERCY_TOKENin CI secrets). - The project wants visual diffs reviewed in a hosted UI (vs. self-hosted Playwright snapshots) and uses BrowserStack for cross-browser coverage.
- A team needs the AI-summary / noise-filtering review flow that Percy provides on top of raw pixel diffs.
If the project does not already use BrowserStack, evaluate
chromatic-visual-regression-testing
(Storybook-first) or playwright-snapshots
(self-hosted) before adopting Percy.
Authoring snapshots
Install (Playwright example)
npm install --save-dev @percy/cli @percy/playwright
Both packages are required: @percy/cli runs the local snapshot server,
@percy/playwright exposes the percySnapshot function (percy-playwright).
Snapshot in a Playwright test
const { chromium } = require('playwright');
const percySnapshot = require('@percy/playwright');
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('http://example.com/', { waitUntil: 'networkidle2' });
await percySnapshot(page, 'Example Site');
await browser.close();
})();
(Adapted from percy-playwright.)
Options to percySnapshot(page, name, options)
Per the percy-playwright README:
| Option | Effect |
|---|---|
percyCSS |
CSS injected immediately before the screenshot. Use this to neutralize timestamps, ad slots, or animations. |
fullPage |
Capture the entire scrollable page rather than the viewport. |
freezeAnimatedImage |
Freeze animated images (GIF / APNG) so the diff is deterministic. |
ignoreRegionSelectors |
CSS selectors whose bounding boxes are excluded from the diff. |
customIgnoreRegions |
Coordinate-based exclusion zones for ad-hoc cases. |
Other SDKs (@percy/cypress, @percy/selenium, @percy/storybook)
expose the same shape with framework-specific calling conventions -
check the matching SDK README on github.com/percy.
Configuration file
The Percy CLI looks for config in this order (percy-config):
"percy"block inpackage.json.percyrc(YAML or JSON).percy.json.percy.yaml/.percy.yml.percy.js/percy.config.js
The first found wins, searched from CWD up to the home directory. Use this file to set project-wide defaults (viewports, percyCSS, network idle timeout). For the current schema of the snapshot block (widths array, minimum height, etc.), check the latest percy-cli release - the schema evolves with major versions and reproducing it from memory risks drift.
Running
The canonical invocation is percy exec -- <test command>
(percy-exec):
export PERCY_TOKEN=<your project token>
percy exec -- npx playwright test
percy exec -- yarn cypress run
percy exec -- npx jest
percy exec starts a local snapshot server on port 5338 (configurable),
proxies snapshot requests from the SDK during the test run, and finalizes
the build when the wrapped command exits (percy-exec).
Useful percy exec flags
Per percy-exec:
| Flag | Purpose |
|---|---|
--parallel |
Mark the build as part of a parallel CI matrix. |
--partial |
Allow the build to be marked partial (e.g. early exit). |
-P, --port <n> |
Override the local server port (default 5338). |
-d, --dry-run |
Capture snapshots locally without uploading. |
-h, --allowed-hostname |
Restrict asset discovery to specific hostnames. |
Установить percy-visual-regression-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл percy-visual-regression-testing?
Use when visual regression tests run on BrowserStack Percy: @percy/cli with the Playwright, Cypress, Selenium or Storybook SDK, percy exec, viewports, masks and ignored regions, and reviewing diffs in Percy builds.
Как установить скилл percy-visual-regression-testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл percy-visual-regression-testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic