API Integration
Connect TestKase to GitLab Issues for real-time requirement sync, defect push, and bidirectional traceability.
Looking for the browser-based approach? See the GitLab Chrome Extension for a lightweight alternative that works directly inside GitLab.
Overview
The GitLab API integration connects TestKase with GitLab Issues to create a seamless bridge between test management 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 -- eliminating manual data entry and keeping both systems in sync.
This integration is especially valuable for teams that manage their product backlog in GitLab and want to maintain full traceability from requirements through test cases to defects.
Auto-sync
GitLab issues automatically imported and kept in sync
Field mapping
Priority, status & fields mapped automatically
Easy setup
Connect with a Personal Access Token in minutes
Real-time sync
Changes in GitLab reflected automatically in TestKase
Secure
Tokens stored encrypted, never exposed
Non-destructive
Disconnect anytime, data is preserved
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 in your TestKase project (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.
Requirements Sync
Once connected, TestKase automatically syncs GitLab issues as requirements in real time. There is no manual import step required -- the integration keeps both systems in sync continuously.
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 from the defects list.
- Click the Push to GitLab button in the defect detail view.
- TestKase creates a new issue in your connected GitLab project with the defect details.
- A bidirectional link is established -- the TestKase defect shows a clickable link to the GitLab issue, and the GitLab issue description includes a reference back to TestKase.
Push During Test Execution
The most efficient workflow is to push defects during test execution:
- Execute a test case in a test cycle.
- When a test fails, create a defect directly from the execution view.
- The defect is automatically linked to the failed test case.
- Click Push to GitLab to immediately create the GitLab issue.
This captures the most context (test case, cycle, execution details) and ensures no information is lost between discovery and reporting.
Bidirectional Sync
Once a defect is pushed to GitLab, changes are synchronized between both systems automatically:
- Status updates -- When the GitLab issue is closed or reopened, the defect status in TestKase updates automatically. Similarly, status changes in TestKase are reflected in GitLab.
- Labels -- Priority labels are applied to the GitLab issue and kept in sync.
- Comments -- Comments added on the GitLab issue appear on the TestKase defect, and vice versa.
The sync is automatic and continuous. You do not need to manually trigger updates after the initial push.
Field Mapping for Defects
TestKase automatically maps defect fields to GitLab issue fields when pushing:
| TestKase Defect Field | GitLab Issue Field | Notes |
|---|---|---|
| Title | Title | Mapped directly |
| Description | Description | Includes a link back to the TestKase defect |
| Priority | Labels | Mapped to priority labels (see table below) |
| Status | State | Open/In-Progress maps to opened, Closed/Achieved maps to closed |
Priority Mapping
| TestKase Defect Priority | GitLab Label |
|---|---|
| Blocker | priority::critical |
| Critical | priority::high |
| Major | priority::medium |
| Minor | priority::low |
| Trivial | priority::low |
If the priority labels do not exist in your GitLab project, TestKase will create them automatically when the first defect is pushed.
Viewing Pushed Defects
After a defect is pushed to GitLab, the defect detail view in TestKase displays:
- A GitLab badge with the issue IID (e.g., #45). Clicking the badge opens the GitLab issue in a new tab.
- The current sync status.
From the GitLab side, the created issue includes:
- The defect title as the issue title.
- The defect description with a link back to TestKase.
- Priority labels applied automatically.
Management
What Happens on Disconnect
If you disconnect the GitLab integration:
- Auto-sync stops between TestKase and GitLab.
- Existing imported requirements are preserved in TestKase -- they are not deleted.
- Existing pushed defects remain in GitLab -- they are not removed.
- Cross-reference links on existing items continue to work (they link to the GitLab URL).
- Previously synced requirements become editable in TestKase.
- You can reconnect to the same or a different project at any time.
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). Verify your token has the api scope and the instance URL is correct. If the
project has required issue fields or templates, the push may fail.
▶Priority labels are not being applied
TestKase creates priority labels automatically. If your GitLab project has restrictions on label creation, create the labels manually in your project settings.
▶Can I connect multiple GitLab projects to one TestKase project?
No. Each TestKase project supports one external integration connection at a time. To work with multiple GitLab projects, create separate TestKase projects for each. This keeps the traceability clean and avoids cross-project confusion.
▶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.
▶Does disconnecting delete pushed defects from GitLab?
No. Disconnecting only removes the integration link in TestKase. Issues created in GitLab via defect push remain in the project regardless of the TestKase integration status.
