Bitbucket Integration
Setup Guide for integrating Bitbucket with Hypertest
Pre-requisites
Your repositories are hosted on Bitbucket
Your Bitbucket user account should have your repository
Your CI pipeline is triggered on pull request events. Refer CI Integration
Sample file
A sample CI file for Bitbucket CI can be found below
Steps to integrate Bitbucket
1. Create an app password
HyperTest will add comments on the merge request discussions. We recommend you create a new user in bitbucket and add to your repo for this. You can however use an existing user as well.
The required scope for password is Pull requests
Create the app password with large expiration time (like 10 years)
2. Copy Bitbucket workspace
A workspace is where you will create repositories, collaborate on your code. Below is how the URLs will be formatted for any repositories you create in your workspace:
www.bitbucket.org/<workspace name>/<repo name>
3. Update Hypertest Configuration
To publish reports on your CI, we need to provide above your bitbucket repo info and access to it 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 Bitbucket confirguration such as workspace, repo name etc in your CI file, you don't need to do this Step 3.
Below is example for both
a. HyperTest's Dashboard Configuration
This can be done by navigating to the Settings page in HyperTest Dashboard. Click on Service Configuration and copy-paste the below parameters and edit the value's accordingly. Click on update after you have added.
Click on "Update" and you have successfully integrated Bitbucket with HyperTest.
b. Add the below enviornment variables in your CI pipeline
See details in bitbucket CI file above on how to set them
Now every time your CI(Bitbucket or other CI tools) triggers a test through HyperTest CLI, HyperTest will add Check reports to your merge request like below.
By default, checks will be in a failed state in order for you to read the HyperTest Report.
Last updated