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.

Base screenshot

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.

GitLab comment

Your comment should consist of two key words:

  1. “trakr” – This tells the platform to trigger a visual test
  2. (optionally) a base URL of your “development/build” environment. For example, http://build123.example.com

Merge request testing

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

  1. Do not use Markdown formatting in your comment
  2. Case mixing is ok with the keyword, you can use “Trakr”, “trakr”, “TRAKR”.
  3. 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:password@build123.example.com
  4. Your build environment URL should start with http or https, “build123.example.com” will not work
  5. 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.