Documentation Index
Fetch the complete documentation index at: https://docs.grantiva.io/llms.txt
Use this file to discover all available pages before exploring further.
What is VRT?
Grantiva VRT (Visual Regression Testing) catches unintended UI changes before they ship. You define the screens you care about in a YAML config file, and the CLI-driven capture engine screenshots each one on every pull request. If anything changes, the diff shows up in the dashboard and as a GitHub Check Run on the PR. VRT is not Xcode UI testing. You do not write XCTestCase classes or use Xcode Instruments. The CLI uses its own XCUITest driver (grantiva-runner) to navigate your app and take screenshots. Your existing Xcode UI tests are unaffected.
The baseline/capture/compare lifecycle
Every VRT workflow follows three phases:1. Capture
The CLI builds your app, boots a simulator, and navigates through each screen defined ingrantiva.yml. Screenshots are uploaded to the Grantiva dashboard.
2. Compare
Each new screenshot is diffed against the stored baseline using two metrics:| Metric | Default | Description |
|---|---|---|
| Pixel diff | 2% | Percentage of pixels that changed |
| Perceptual distance | 5.0 | CIE76 color-space distance — more human-aware than pixel counting |
3. Approve or reject
Approve expected changes to update the baseline. Reject unexpected ones to block the PR.How the CLI driver works
Grantiva ships a pre-built XCUITest runner binary (grantiva-runner) inside the CLI. This runner:
- Installs into the simulator as a host app
- Receives navigation instructions from the CLI over a local socket
- Executes taps, swipes, and waits to drive your app to each screen
- Hands screenshot timing back to the CLI
Local vs CI usage
Local development:grantiva diff approve) can be run locally or from CI.
CI (GitHub Actions, Bitrise, etc.):
grantiva ci run runs build + capture + compare + upload in sequence. The result is posted as a GitHub Check Run on the pull request.
Authentication:
- Local:
grantiva auth loginopens your browser. Credentials are cached in the keychain. - CI: Pass
GRANTIVA_API_KEYas an environment variable (from your CI secrets). The--api-keyflag or env var is picked up automatically.
How results appear in the dashboard
Eachgrantiva ci run creates a VRT Run in your dashboard with:
- Total / Passed / Failed / New screen counts (clickable to filter the screenshot grid)
- Per-screen status:
passed,failed,new_screen, orpending - Side-by-side baseline vs current diff view for failed screens
- Approve/reject controls (also available via CLI)
Configuration reference
grantiva.yml controls everything:
Next steps
- VRT Quick Start — get running in under 10 minutes
- CLI Commands — full command reference including
grantiva diff,grantiva ci run,grantiva doctor - CI Integration — GitHub Actions, Bitrise, and Xcode Cloud examples