TestKase Docs
Core TestingRequirements

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:

  1. A GitLab Personal Access Token with api scope.
  2. Your GitLab instance URL (e.g., https://gitlab.com or your self-hosted URL).
  3. The Project ID or project path of the GitLab project (e.g., your-group/your-project).
  4. 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:

  1. Navigate to SettingsJira Integration (the integration page supports all platforms).
  2. Select GitLab as your platform.
  3. Enter your GitLab instance URL (e.g., https://gitlab.com or your self-hosted URL).
  4. Enter the Project ID or project path (e.g., your-group/your-project).
  5. Paste your Personal Access Token with api scope.
  6. 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 FieldTestKase FieldNotes
TitleTitleMapped directly
DescriptionDescriptionMarkdown converted to rich text
LabelsPriorityMapped based on label naming conventions
State (opened/closed)StatusOpened maps to Active, closed maps to Deprecated
Issue IIDExternal LinkStored as clickable reference link

Priority Mapping via Labels

GitLab LabelTestKase Priority
priority::criticalP0 (Critical)
priority::highP1 (High)
priority::mediumP2 (Medium)
priority::lowP3 (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

  1. Open a defect in TestKase.
  2. Click the Push to GitLab button.
  3. TestKase creates a new GitLab issue in your connected project with the defect details.
  4. 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 FieldGitLab Issue FieldNotes
TitleTitleMapped directly
DescriptionDescriptionIncludes TestKase defect link
PriorityLabelsMapped 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.