Diffy is a visual regression testing service. It is primarily tailored to testing Drupal and WordPress websites.
This repository is a recipe for DDEV to have a local worker that will allow taking screenshots from local website and upload them to Diffy for further comparisons.
ddev add-on get DiffyWebsite/ddev-diffy
ddev restartAfter installation, make sure to commit the .ddev directory to version control.
Register an account in Diffy and create an API key.
Once you have your container ready after ddev restart, we need to provide API key and project ID to .env file. For that go to .ddev/diffy-worker, copy existing example file cp .env.example .env and edit .env file to provide your credentials:
cp .ddev/diffy-worker/.env.example .ddev/diffy-worker/.env
ddev dotenv set .ddev/diffy-worker/.env --diffy-api-key=XXX --diffy-project-id=XXXTo run the screenshots do ddev screenshot. It will produce a URL to your screenshots uploaded to Diffy. Next you can compare them to your any other sets (production, staging, baseline etc.).
Remember to check our documentation page.
| Command | Description |
|---|---|
ddev screenshot |
Launch Diffy screenshot |
ddev describe |
View service status for Diffy |
ddev logs -s diffy |
Check Diffy logs |
Contributed and maintained by @ygerasimov