WP VRT
WordPress Visual Regression Testing Plugin
★ 0stars
185composer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/horttcore/wp-vrt/archive/refs/heads/main.zipAlso on Packagist as ralfhortt/wp-vrt:
composer require ralfhortt/wp-vrtFrom the readme
WP VRT
Virtual pages for block/theme visual regression testing in WordPress.
Usage
- Block example: /wp-vrt/block/core-paragraph
- Block variation: /wp-vrt/block/core-button/outline
- Pattern: /wp-vrt/pattern/{pattern-slug}
- Template: /wp-vrt/template/{template-slug}
- Template part: /wp-vrt/template-part/{part-slug}
- Scenario: /wp-vrt/scenario/{scenario-slug}
Discovery Endpoint
/wp-json/wp-vrt/v1/discover
Returns a manifest of blocks, patterns, templates, template parts, and scenarios with URLs.
Pest Visual Regression
Install dev dependencies:
Install Playwright for screenshots:
Admin UI Build
Install dependencies and build the admin UI bundle:
For development:
Run tests:
You can override the Node binary:
To store screenshot PNGs in wp-content/wp-vrt-snapshots, set:
Scenarios (theme/plugin)
Register custom scenarios from your theme or another plugin.
You can also use a callable for content if you need custom logic.
Default Scenario Coverage
WP VRT does not ship any built-in scenarios. Scenarios are expected to be registered by your theme or other plugins.
| Scenario | Coverage | Notes |
| --- | --- | --- |
| (none) | N/A | Register scenarios via wpvrtregiste