GitLab Integration
Connect TestKase to GitLab Issues for real-time requirement sync, defect push, and traceability.
Overview
The GitLab integration connects TestKase with GitLab Issues to sync requirements and defects between your test management platform and your development workflow. When connected, GitLab issues are automatically imported as requirements, changes are reflected in real time, and linked test cases appear as comments on the GitLab issue.
Prerequisites
Before setting up the GitLab integration, make sure you have the following ready:
- A GitLab Personal Access Token with
apiscope. - Your GitLab instance URL (e.g.,
https://gitlab.comor your self-hosted URL). - The Project ID or project path of the GitLab project (e.g.,
your-group/your-project). - Project Admin or Owner role in the TestKase project. See User Permissions for details.
Generate a GitLab PAT at Settings → Access Tokens in your GitLab profile. Select the api scope to grant full API access. For self-hosted GitLab instances, ensure the token is created on the same instance you want to connect.
Setup
Follow these steps to connect your TestKase project to GitLab Issues:
- Navigate to Settings → Jira Integration (the integration page supports all platforms).
- Select GitLab as your platform.
- Enter your GitLab instance URL (e.g.,
https://gitlab.comor your self-hosted URL). - Enter the Project ID or project path (e.g.,
your-group/your-project). - Paste your Personal Access Token with
apiscope. - Click Connect and then Save.
Each TestKase project can be connected to one external project at a time. If you need to sync with multiple GitLab projects, create separate TestKase projects for each.
Auto-Sync
Once connected, TestKase automatically syncs GitLab issues as requirements in real time.
How Auto-Sync Works
- Automatic import -- GitLab issues from the connected project are automatically imported as requirements in TestKase. The issue title becomes the requirement title, and the issue description becomes the requirement description.
- Real-time updates -- When a GitLab issue is updated (title, description, labels, or state changes), those changes are reflected in TestKase automatically.
- Test case comments -- When test cases are linked to a synced requirement in TestKase, the linked test cases appear as comments on the corresponding GitLab issue. This gives your developers visibility into test coverage directly from GitLab.
- Bidirectional defect sync -- Defect updates sync between TestKase and GitLab Issues.
Field Mapping
GitLab issue fields are automatically mapped to TestKase requirement fields:
| GitLab Field | TestKase Field | Notes |
|---|---|---|
| Title | Title | Mapped directly |
| Description | Description | Markdown converted to rich text |
| Labels | Priority | Mapped based on label naming conventions |
| State (opened/closed) | Status | Opened maps to Active, closed maps to Deprecated |
| Issue IID | External Link | Stored as clickable reference link |
Priority Mapping via Labels
| GitLab Label | TestKase Priority |
|---|---|
priority::critical | P0 (Critical) |
priority::high | P1 (High) |
priority::medium | P2 (Medium) |
priority::low | P3 (Low) |
If your GitLab issues do not use priority labels, imported requirements will default to P2 (Medium). You can manually adjust the priority in TestKase after import.
Traceability
From the test case detail view, you can link test cases to GitLab-synced requirements. When a test case is linked, TestKase automatically posts a comment on the corresponding GitLab issue showing the linked test case details. This creates end-to-end traceability from your GitLab backlog through test cases to defects.
Defect Push
Push defects from TestKase to GitLab Issues, creating new issues automatically with all relevant information.
How Defect Push Works
- Open a defect in TestKase.
- Click the Push to GitLab button.
- TestKase creates a new GitLab issue in your connected project with the defect details.
- A bidirectional link is established -- the TestKase defect shows a link to the GitLab issue, and the GitLab issue description includes a reference back to TestKase.
Field Mapping for Defects
| TestKase Defect Field | GitLab Issue Field | Notes |
|---|---|---|
| Title | Title | Mapped directly |
| Description | Description | Includes TestKase defect link |
| Priority | Labels | Mapped to priority labels |
Troubleshooting
▶I see an 'Authentication failed' error
This usually means your Personal Access Token is invalid, expired, or lacks the required scope.
Verify the token in your GitLab profile settings and ensure it has the api scope. For
self-hosted instances, confirm the instance URL is correct and reachable.
▶Synced requirements are missing description
If a GitLab issue has an empty description, the requirement description will also be empty. Custom fields and metadata beyond title, description, labels, and state are not synced automatically.
▶Pushed defect is not appearing in GitLab
Ensure the token user has at least Reporter role on the GitLab project (Developer or higher is recommended). If the project has required issue fields or templates, the push may fail.
▶What happens to synced requirements if I disconnect?
Synced requirements remain in TestKase as regular requirements. They become fully editable and no further sync operations occur. No data is lost during disconnection.