The `percy` library provides a Python client for integrating visual regression testing with Percy (https://percy.io). It enables capturing snapshots of web pages during tests and uploading them to the Percy platform for visual comparison. It is currently at version 2.0.2, with an active development cycle that frequently includes minor improvements and occasional major versions for breaking changes.
pip install percyVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the basic lifecycle for using the Percy Python client: initialize `PercyRunner`, start a build, take one or more snapshots using a WebDriver instance, and then finalize the build. It requires a `PERCY_TOKEN` environment variable to successfully upload snapshots to Percy. A mock WebDriver is used to make the example runnable without a full browser setup.
Remove `PERCY_PROJECT` from your CI environment variables. Percy now determines the project based on the `PERCY_TOKEN`.
Avoid direct calls to `create_build`. The recommended approach is to simply call `runner.start_build()` which handles the build creation internally. Ensure necessary environment variables (e.g., `PERCY_TOKEN`) are correctly set.
Set the `PERCY_TOKEN` environment variable in your CI/CD environment or locally (e.g., `export PERCY_TOKEN="YOUR_TOKEN"`). Obtain your token from the Percy project settings on percy.io.
No dependency data recorded yet.