TestKase
TestKase
|Docs
Test ManagementIntegrationsGitHub

API Integration

Connect TestKase to GitHub Issues to search issues, link them to test cases, post coverage comments, and refresh issue status on demand.

Overview

The GitHub API integration connects a TestKase project to GitHub Issues so you can search issues, link them to your test cases as requirements, and keep a lightweight traceability bridge between test management and development. When you link a test case to a GitHub issue, TestKase posts a comment on that issue listing the linked test cases, giving developers visibility into test coverage. Issue status is pulled from GitHub on demand whenever you refresh it.

Search and link

Search your GitHub issues on demand and link them to test cases as requirements

Coverage comments

Linked test cases are posted as a comment on the corresponding GitHub issue

Manual status refresh

Pull the latest GitHub issue state into TestKase whenever you refresh

Developer visibility

Linked test cases appear as a comment on the GitHub issue

Easy setup

Connect with a Personal Access Token in minutes

Non-destructive

Disconnect anytime, data is preserved

Prerequisites

Before setting up the GitHub integration, make sure you have the following ready:

  1. A GitHub Personal Access Token (classic) with the repo scope. If you will connect a repository owned by an organization, the token also needs read:org -- without it TestKase cannot list your organizations and setup cannot continue.
  2. Your GitHub username.
  3. Project Admin or Owner role in the TestKase project. See User Permissions for details.

Generate a GitHub PAT at https://github.com/settings/tokens. Select the repo scope for full access to private repositories, and add read:org if the repository belongs to an organization.

Setup

In TestKase project settings, requirement and defect integrations are configured separately. To search and link GitHub issues from your test cases, configure the requirement integration:

  1. In TestKase, open the Requirement Integration page for your project.
  2. Under API Integrations, click Connect on the GitHub card.
  3. Enter your GitHub Username.
  4. Paste your Personal Access Token.
  5. Choose the Account Type -- Personal for your own repositories, or Organization to pick an organization first.
  6. Click Next. If you chose Organization, select the organization.
  7. Select the repository from the dropdown, then click Save.

Defect integration is configured the same way from the Defect Integration page.

Each TestKase project can be connected to one external project at a time (per integration type). If you need to work with multiple GitHub repositories, create separate TestKase projects for each.

The Repository Dropdown Shows One Page

TestKase asks GitHub for a single page of repositories, so the dropdown holds the first 30 the token can see (GitHub's default page size). The label above the dropdown tells you how many were returned. If it says 30 and your repository is missing, use a token or organization scope that exposes fewer repositories, and reconnect.

One Repository per TestKase Project

A GitHub repository can be connected to one TestKase project at a time. If it is already connected somewhere else, saving fails with "This github-api project is already configured with another testkase project." Reset the connection on the other TestKase project first.

The Token Must Be Able to Comment

Linking a test case posts a coverage comment on the GitHub issue in the same operation. If the token cannot write to the repository, the link itself fails -- nothing is saved and you see an error. A classic token with the full repo scope covers this; a read-only token does not.

Linking Requirements

Once connected, you can search your GitHub repository'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 repository's issues by keyword. TestKase queries GitHub live and returns matching issues (number, title, and state). Results arrive 10 per page, and your typing is sent about 0.4 seconds after you stop. The picker's column sorting reorders only the page you are looking at, not the whole result set.
  • Browsing with an empty search -- With no keyword typed, TestKase lists the repository's issues newest first, both open and closed. That listing comes from GitHub's issues endpoint, which counts pull requests as issues, so pull requests appear in the list. Typing a keyword switches to GitHub's search, which returns issues only.
  • Link an issue -- Select an issue to link it. The issue title is stored as the requirement title and the issue number is stored as a clickable reference.
  • Coverage comment -- When you link a test case to a GitHub 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 GitHub. Coverage comments are posted only by the API Integration -- projects connected through the Chrome Extension do not post comments back to GitHub.

Linked Requirement Behavior

  • Linked requirements display a GitHub badge showing the issue number. Clicking the badge opens the GitHub issue in a new tab.
  • GitHub 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 GitHub issues. When a test case is linked, TestKase automatically posts a comment on the corresponding GitHub issue showing the linked test case details. This gives your developers direct visibility into which tests cover each issue -- without leaving GitHub. 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 GitHub issue is refreshed on demand:

  • Use the refresh action to pull the current state of a linked issue from GitHub into TestKase.
  • The raw state value from GitHub is stored as-is. There is no automated transformation of GitHub 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.

Refresh works on one test case at a time -- it updates the issues linked to the test case you have open. There is no repository-wide refresh, so state across a large project is only as current as the last time someone refreshed each test case.

🚧 Coming soon -- automatic, real-time bidirectional sync (webhook-driven state updates and label/priority mapping between GitHub and TestKase). Today, status is pull-only and refreshed manually.

If the Token Expires or Is Revoked

The Personal Access Token is stored with the project's connection and used for every call. When it stops working, the symptoms differ by action:

ActionWhat you see
Searching GitHub from a test case"Invalid GitHub Access Token. Please contact your admin to update the token."
Linking a test case to an issueThe link fails and nothing is saved
Refreshing a linked issue's stateNo error. The refresh quietly leaves the previously stored state in place

To recover: generate a new classic token with repo (plus read:org for organization repositories), click Edit on the GitHub integration card, paste it, and save. Existing links, coverage comments and requirement records are untouched -- only the credential changes.

Defect Push

🚧 Coming soon -- pushing defects from TestKase to create new GitHub issues. The API integration does not yet create issues in GitHub. For now, defects are tracked in TestKase (see Built-in Defects), and you can link test cases to existing GitHub issues for traceability.

When available, defect push is planned to create a new GitHub issue from a TestKase defect, apply priority labels, and establish a cross-reference link between the two. This capability is not yet built.

Management

Disconnecting the Integration

To disconnect the GitHub integration, open the requirement integration (or defect integration) configuration in project settings and remove the connection. When you disconnect:

  • Linked requirements remain in TestKase as regular, fully editable requirements. No data is lost.
  • Issue search and status refresh stop working for this project.
  • The GitHub badge on requirements continues to link to the GitHub URL, and comments already posted on GitHub issues remain in GitHub.

You can reconnect at any time by following the Setup steps again.

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 at https://github.com/settings/tokens and ensure it has the repo scope. Generate a new token if needed.

▶No organizations appear when I choose the Organization account type

Listing your organizations requires the read:org scope on a classic Personal Access Token. If the token only has repo, GitHub returns an empty list and TestKase stops with "No organizations found for this account" -- setup cannot continue. Add read:org to the token -- or generate a new token with both repo and read:org -- and start the connection again.

▶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 GitHub. If refresh fails, verify the integration is still connected and the token has not expired.

▶The coverage comment did not appear on my GitHub issue

TestKase posts a comment on the GitHub issue when you link a test case to it. If the comment is missing, confirm the token user has write access to the repository and that the integration is still connected.

▶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.

Questions

▶Is there a simpler way to connect GitHub?

Looking for a lighter-weight option? The Chrome Extension lets you link requirements and manage test cases without leaving your browser.

▶Refresh works but nothing syncs

A revoked or expired token does not make refresh fail visibly -- the state you see is simply the last one TestKase managed to fetch, which may be weeks old. If linked issue states have stopped moving, check the token before assuming the issues have not changed.

▶I already use the built-in requirements

If this project's requirement integration is currently Built-in, connecting GitHub deletes your built-in requirements. After you pick the repository, TestKase shows a Data Loss dialog. Pressing Continue resets the existing integration first -- and resetting a Built-in integration permanently deletes every requirement and requirement folder in the project (on the Defect Integration page, every built-in defect). The deletion happens before the new connection is saved, so cancelling the rest of the wizard does not undo it. Export first, and read Built-in before you switch. Replacing one external connection with another does not delete anything -- only Built-in data is destroyed.