The GitHub/Trakr integration gives you the ability to run the visual comparison tests automatically as part of your development workflow on GitHub repositories. This is useful if the codebase for your website/web-app is hosted on GitHub as either a public or private repository.
In order to use this integration, you should have the following:
- An active Trakr user account.
- A GitHub (www.github.com) user account
- Codebase for your website/web-app hosted on github.com as a public or private repository
- Use a pull request (PR) workflow on GitHub (learn more)
- A publicly accessible “build environment” for Trakr when the pull request is created and/or when additional commit added in that pull request.
Additionally, if the codebase is hosted on an organizational account, you will need administrative access to the organization account in order to install the integration.
How it works
The integration works by adding Trakr as an additional “check” in GitHub’s pull request workflow. Trakr will automatically perform a visual comparison test for pull requests on any configured repository/base branch.
Below is an illustration of how Trakr works with GitHub’s pull request (PR) workflow:
- Upon opening a pull request, Trakr creates a screenshot collection against the baseline environment in the configured project (normally production or staging environment)
- You will be prompted to provide the environment that is generated from the pull request. We generally call this the “build environment”. This environment should be accessible by Trakr.
- Trakr will generate a screenshot collection against the build environment, this will be used to perform the comparison test.
- A visual comparison test will be generated between the baseline screenshots and the screenshots generated by the build environment.
- Finally, after reviewing the test, you can mark the test as pass or fail in GitHub.
Any additional commits pushed to this pull request will trigger steps 2 to 5 and prompt another visual test.