API Integration
Connect TestKase to GitLab Issues to search issues, link them to test cases, post coverage comments, and refresh issue status on demand.
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 a TestKase project to GitLab Issues so you can search issues, link them to your test cases as requirements, and keep a lightweight traceability bridge between test management and your development workflow. When you link a test case to a GitLab issue, TestKase posts a comment on that issue listing the linked test cases, giving developers visibility into test coverage. Issue status is pulled from GitLab on demand whenever you refresh it.
This integration is especially valuable for teams that manage their product backlog in GitLab and want to maintain traceability from requirements through test cases.
Search and link
Search your GitLab issues on demand and link them to test cases as requirements
Coverage comments
Linked test cases are posted as a comment on the corresponding GitLab issue
Manual status refresh
Pull the latest GitLab issue state into TestKase whenever you refresh
Easy setup
Connect with a Personal Access Token in minutes
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
In TestKase project settings, requirement and defect integrations are configured separately. To search and link GitLab issues from your test cases, configure the requirement integration:
- Open your TestKase project Settings and go to the requirement integration configuration.
- 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 (per integration type). If you need to work with multiple GitLab projects, create separate TestKase projects for each.
Linking Requirements
Once connected, you can search your GitLab project's issues from within TestKase and link them to test cases as requirements. There is no automatic bulk import and no continuous background sync -- issues are searched on demand and linked individually.
How Linking Works
- Search on demand -- From a test case, search your connected project's issues by keyword. TestKase queries GitLab live and returns matching issues (IID, title, and state).
- Link an issue -- Select an issue to link it. The issue title is stored as the requirement title and the issue IID is stored as a clickable reference.
- Coverage comment -- When you link a test case to a GitLab issue, TestKase posts a comment on that issue listing the linked test cases. Linking or unlinking additional test cases updates or removes that comment. This is the only change TestKase writes back to GitLab.
Linked Requirement Behavior
- Linked requirements display a GitLab badge showing the issue IID. Clicking the badge opens the GitLab issue in a new tab.
- GitLab remains the source of truth for the linked issue's title and state.
- You can link test cases and defects, add attachments, and assign requirements to folders within TestKase -- these fields are managed locally.
Traceability from Test Cases
From the test case detail view, you can link test cases to GitLab issues. When a test case is linked, TestKase automatically posts a comment on the corresponding GitLab issue showing the linked test case details. This creates traceability from your GitLab backlog through to your test cases. Unlinking a test case updates or removes that comment accordingly.
Refreshing Issue Status
TestKase does not receive live webhooks or run a background sync. Instead, the state of a linked GitLab issue is refreshed on demand:
- Use the refresh action to pull the current state of a linked issue from GitLab into TestKase.
- The raw state value from GitLab is stored as-is. There is no automated transformation of GitLab labels or state into TestKase priority or status values.
- Refresh whenever you want the latest state -- for example, before reviewing coverage or building a report.
🚧 Coming soon -- automatic, real-time bidirectional sync (webhook-driven state updates and label/priority mapping between GitLab and TestKase). Today, status is pull-only and refreshed manually.
Defect Push
🚧 Coming soon -- pushing defects from TestKase to create new GitLab issues. The API integration does not yet create issues in GitLab. For now, defects are tracked in TestKase (see Built-in Defects), and you can link test cases to existing GitLab issues for traceability.
When available, defect push is planned to create a new GitLab issue from a TestKase defect, apply priority labels, and establish a cross-reference link between the two. This capability is not yet built.
Management
What Happens on Disconnect
If you disconnect the GitLab integration (from the requirement integration or defect integration configuration in project settings):
- Issue search and status refresh stop working for this project.
- Existing linked requirements are preserved in TestKase -- they are not deleted.
- Cross-reference badges on existing items continue to link to the GitLab URL.
- Comments already posted on GitLab issues remain in GitLab.
- 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.
▶A linked issue's state looks out of date
TestKase does not sync state in the background. Use the refresh action on the linked issue to pull its current state from GitLab. If refresh fails, verify the integration is still connected and the token has not expired.
▶The coverage comment did not appear on my GitLab issue
TestKase posts a comment on the GitLab issue when you link a test case to it. If the comment is missing, confirm the token user has at least Reporter role (Developer or higher is recommended) on the GitLab project and that the integration is still connected.
▶Can I connect multiple GitLab projects to one TestKase project?
No. Each TestKase project supports one external integration connection at a time (per integration type). 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 linked requirements if I disconnect?
Linked requirements remain in TestKase as regular requirements. They become fully editable and no further status refresh is possible until you reconnect. No data is lost during disconnection.
