Integrations Getting Started
You could have three levels of integrations:
1. Everything is manual. You have no integration and you trigger all the jobs manually from the UI. Monitoring.
2. Trigger comparison during the deployments. Example: once you deploy to Staging environment comparison triggered to check it against Production.
3. Testing every pull request. If you build pull request environments we can set up Diffy to check these environments against staging (dev or production) and post results back to the pull request. This is most complex but most rewarding type of integration as you will catch bugs as early as possible.
For all integrations, we have built a CLI tool https://github.com/DiffyWebsite/diffy-cli.
Download the latest release from https://github.com/DiffyWebsite/diffy-cli/releases page. You can copy the file to your executables so it is available everywhere.
chmod a+x diffy.phar cp diffy.phar /usr/local/bin/diffy
You will need to create a Key to authentication the CLI tool. You can find it under the My Account menu.
Once you have a key you can run auth:login
diffy auth:login XXXXXXXX
For security reasons, we encourage you to keep the key as an environmental variable in your CI service. In this way, it won't be exposed to anyone who has access to the code of your project.
Next, you can run the following commands to trigger creating the screenshots and comparing them.
diffy screenshot:create PROJECT_ID ENVIRONMENT
PROJECT_ID is an ID of the project. You can get it from the URL of your project. ENVIRONMENT is one of "production", "staging", "development"
You can use
--wait key to wait for the screenshot to be completed.
As a result, you will get an ID of the screenshot.
diffy diff:create PROJECT_ID SCREENSHOT_ID1 SCREENSHOT_ID2
Compare screenshots with id SCREENSHOT_ID1 and SCREENSHOT_ID2.
We encourage you to check out our examples of shell scripts https://github.com/DiffyWebsite/diffy-cli/tree/master/examples.
If you find some commands are missing please let us know so they will get implemented asap.