GitLab
To install the GitLab plugin, see Upload plugin section.
Integration with the GitLab Bug Tracking System (BTS) can be helpful for projects which are already using GitLab BTS as a tracking tool. The integration provides an exchange of information between our test automation reporting dashboard and the GitLab Server, such as posting issues and linking issues, getting updates on their statuses.
Permission:
The Administrator can upload a plugin and create global integrations on the Plugin tab in the Administrate section. The Project Manager can work only on the project level. He can unlink and re-write global configuration with project ones on Project Settings > Integrations.
GitLab BTS integration can be configured on the global level (for all projects on the instance) or on the project level (only for one project).
Global GitLab BTS integration
Add new global GitLab BTS integration
You might want to configure global integrations which will be applied on all projects if all projects on your instance are using the same GitLab BTS projects.
-
Log in as ADMIN.
-
Go to Administrate > Plugins.
-
Click on GitLab plugin panel.
-
Click on "Add integration" button.
- Fill and confirm the authorization form.
'Integration Name': <The name which you want to give to your integration> - should be unique
'Link to BTS': <valid URL of bug tracking system>
'Project ID in BTS': <project ID in bug tracking system>
'Access Token': <your personal Access Token from GitLab>
How to find Access Token in Gitlab? Please, see the image below.
After you have created a connection with the GitLab project, you can choose predefined GitLab ticket fields. These fields will be shown to you all the time when you post the issue in GitLab.
- Issue type: dropdown with options "issue" (default) or "incident"
- Title (required)
- Description
- Confidential: dropdown with options "Yes" or "No"
- Assignee(s)
- Due date
- Labels
- Milestone
- Epic – GitLab Enterprise Version
- Weight – GitLab Enterprise Version
You can fill in the fields marked as 'GitLab Enterprise Version,' but this data will only appear in GitLab if you have the Paid Enterprise version.
In the free version of GitLab, you can only enter one Assignee.
The Assignee(s) field searches both by login and by name.
The Milestone, Epic, Assignee(s), Label fields work through autocomplete.
Now team members on all your projects will be able to submit issues in GitLab. Options for Post Issue/Link issue are activated.
You can add more integrations by clicking on "Add integration" button.
Update global GitLab BTS integration
If you need to edit GitLab BTS integration authorization parameters, perform actions described below:
-
Log in as ADMIN.
-
Go to Administrative > Plugins.
-
Click on GitLab plugin panel.
-
Click on a tab with existing integration.
-
Click on "Edit" icon.
-
Change "Integration name".
-
Type your Access Token.
-
Click "Save" button.
If you need to edit fields which should be posted in GitLab BTS, perform actions described below:
-
Log in as ADMIN.
-
Go to Administrative > Plugins.
-
Click on GitLab plugin panel.
-
Click on a tab with existing integration.
-
Click on "Edit" button in Configuration section.
-
Check the needed fields and fill them in if necessary.
-
Click on "Submit" button.
Remove global GitLab BTS integration
If you need to remove GitLab BTS integration, perform actions described below:
-
Log in as ADMIN.
-
Go to Administrative > Plugins.
-
Click on GitLab plugin panel.
-
Click on a tab with existing integration.
-
Click on "Remove" icon.
-
Click "Delete" button.
Project GitLab BTS integration
Add new project GitLab BTS integration
If any project needs different GitLab BTS configurations, you should unlink a project from Global configurations and add a project configuration. It means that now when a new global integration is added to our test automation results dashboard tool, it won't be applied to the unlinked project.
For that,
-
Log in as an ADMIN or Project Manager.
-
Go to Project Settings > Integrations.
-
Click on the GitLab integration panel.
-
Click on "Add Project Integration" button.
-
Fill necessary fields and click "Create" button.
'Integration Name': <The name which you want to give to your integration> - should be unique
'Link to BTS': <valid URL of bug tracking system>
' Project ID in BTS': <project ID in bug tracking system>
'Access Token': <your personal Access Token from GitLab>
After you have created a connection with the GitLab project, you can choose predefined GitLab ticket fields. These fields will be shown to you all the time when you post the issue in GitLab.
- Issue type: dropdown with options "issue" (default) or "incident"
- Title (required)
- Description
- Confidential: dropdown with options "Yes" or "No"
- Assignee(s)
- Due date
- Labels
- Milestone
- Epic – GitLab Enterprise Version
- Weight – GitLab Enterprise Version
You can fill in the fields marked as 'GitLab Enterprise Version,' but this data will only appear in GitLab if you have the Paid Enterprise version.
In the free version of GitLab, you can only enter one Assignee.
The Assignee(s) field searches both by login and by name.
The Milestone, Epic, Assignee(s), Label fields work through autocomplete.
You can add more integrations by clicking on "Add Project Integration" button.
Reset to global GitLab BTS Integration
If you want to delete project integrations with GitLab BTS and link your project with global configurations, perform actions described below:
-
Log in as an ADMIN or Project Manager.
-
Go to Project Settings > Integrations.
-
Click on the GitLab integration panel.
-
Click on "Reset to Global Integrations" button.
- Click "Reset" button.
Post issue to GitLab BTS
Posting an issue to GitLab BTS means to create a new issue in GitLab BTS from ReportPortal.
If you want to post a new issue to GitLab BTS, you need to have a project or global integration with GitLab.
Post issue via Step view
-
Log in to ReportPortal as Admin, Project Manager, Member, Customer or Operator
-
Go to a Step view.
-
Click on the pencil icon near a needed item to open “Make decision” modal.
- Set defect type, add comment, select “Post issue” option and then “Apply & Continue”.
- Fill in the “Post issue” form with valid data and submit the form.
You can add labels from the dropdown while configuring GitLab integration and during the issue posting. Labels lift from the project in GitLab.
- Click “Post issue” button.
A new issue will be posted in GitLab BTS with information from ReportPortal.
A label with issue ID will be added to the test item.
Link an issue with an issue in GitLab BTS
Linking an issue with an issue in GitLab BTS means adding a clickable link to an existing issue in GitLab BTS from ReportPortal that will show a status of this issue.
Link issue via Step view
-
Log in to ReportPortal as Admin, Project Manager, Member, Customer or Operator.
-
Go to a Step view.
-
Click on the pencil icon near a needed item to open “Make decision” modal.
-
Set defect type, select “Link issue” option and then “Apply & Continue”.
- Fill in the “Link issue” form with valid data and submit the form.
- Click “Link issue” button.
A label with issue ID will be added to the test item.
Unlink an issue in GitLab BTS
You can also unlink an issue.
- Click on the “remove” icon.
- Click “Unlink Issue”.
Link to the issue in GitLab BTS is removed.