Testing GitLab MRs
Before you can trigger Trakr visual testing with your GitLab projects, make sure you have installed/configured your Trakr project to work with GitLab.
Creating a merge request
Once you have configured your GitLab project to work with Trakr, a baseline screenshot collection will be triggered when you create a merge request.
The screenshot collection should have a name that looks like MR [merge request id] (base): [merge request title]. This will be the baseline screenshot Trakr use to perform visual testing later against development/build environments.
Trigger visual testing
To trigger a visual test in Trakr, you simply add a comment in the merge request.
Your comment should consist of two key words:
- “trakr” – This tells the platform to trigger a visual test
- (optionally) a base URL of your “development/build” environment. For example, http://build123.example.com
Once you add the comment in the merge request, a visual test will be triggered against the baseline screenshot collection generated at the creation of the pull request.
FAQs on test triggering
- Do not use Markdown formatting in your comment
- Case mixing is ok with the keyword, you can use “Trakr”, “trakr”, “TRAKR”.
- Your build environment URL should be publically accessible by trakr. You can use basic authentication and include the credentials in the URL such as http://username:email@example.com
- Your build environment URL should start with http or https, “build123.example.com” will not work
- If you do not specify a base URL for your build environment, a visual test will be triggered comparing the same environment as the base screenshot.