Gitlab Integration
Setup guide for Integrating Gitlab with HyperTest.
Pre-requisites
Your repositories are hosted on Gitlab
Your Gitlab user account should have your repository
HyperTest CLI is called from your CI tool on pull request events. Refer CI Integration
Sample file
A sample CI file for gitab CI/CD runner can be found below
Steps to integrate Gitlab
Step 1: Create a personal access token
HyperTest will add comments on the merge request discussions. We recommend you create a new user in gitlab and add to your repo for this. You can however use an existing user as well.
Steps to create a personal access token
Required scopes for access token creation: api
create an access token with a large expiry (like 10 years)
Step 2: Get project ID
Step 3: Update HyperTest Configuration
To publish reports on your CI, we need to provide above ID's etc to HyperTest. You can either add it is a configuration in HyperTest Dashboard's Service Configuration or pass it as environment variable in your CI, while starting a test.
If you have already passed the Gitlab Configurations such as base url, token etc in your CI file, you don't need to do this Step 3.
Below is example for both
a. HyperTest's Dashboard Configuration
1.Set GITLAB_BASE _URL as your base domain (if self hosted) or as https://gitlab.com (if using GitLab cloud version)
2.Add both the Project ID and Base URL in HyperTest's configuration. This can be done by navigating to the Settings page in HyperTest Dashboard. Click on Service Configuration and paste the project ID and base URL.
Click on "Update" and you have successfully integrated Gitlab with HyperTest.
b. Add the below enviornment variables in your CI pipeline
See details in gitlab CI file above
Now every time your CI(Gitlab or other CI tools) triggers a test through HyperTest CLI, HyperTest will add Check reports to your merge request.
By default, checks will be in a failed state in order for you to read the HyperTest Report.
Last updated