Skip to main content

GitHub

GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.

With the GitHub app, you can:

  • link an existing issue in GitHub to a Qase test case, test run, or defect.

  • create a new issue or connect an existing issue in GitHub when you file a defect during a test run in Qase.

  • connect a GitHub workflow to Qase and execute automated runs in GitHub from a Qase test run.

You can also limit access to your GitHub repositories on a per-project basis.

Installation

The following steps will need to be carried out by your GitHub owner/administrator. Please invite them to your workspace and forward these instructions.

You can always deactivate their account after the installation is complete.

Go to the 'Apps' section of your workspace:

The Apps section of the Qase workspace

To install the app, follow these steps:

  1. Click the GitHub card, and hit “Install now”

  2. Log in to GitHub, if you're not already.

  3. Select the GitHub Repositories where you want to install the app, then hit “Install”

  4. After the redirect, hit “Authorise” to complete the installation.

  5. The app is now installed successfully.

Installing the GitHub app: install now, picking repositories, then authorising

Step 4 is important, because it authorizes GitHub to access your Qase workspace.

Access Control

1. Managing access to your GitHub repositories

✏️ Access Control is available on our Teams and Enterprise plans.

By default, every Qase project can search and link every repository the GitHub installation can reach. Access Control lets an administrator change that: map specific GitHub repositories to specific Qase projects, so a project only sees the repositories it has been given.

Open the GitHub app card and click Access Control.

The GitHub app card with the Access Control button

Turn on Enable Access Control, then for each Qase project, search for it and add the repositories it should have access to.

The Access Control screen: Enable Access Control turned on, with repositories assigned to a project

The feature is off by default, and while the toggle is off, nothing changes: every project keeps seeing every repository the installation can reach.

A project only offers the repositories it has been allowed when linking or creating a GitHub issue:

Linking a GitHub issue from a project with allowed repositories — only those repositories appear in the search

Linking a GitHub issue from a project with no allowed repositories: “Nothing available. Access Control settings may limit what this project can use.”

Issue Tracking

1. Creating a new GitHub issue from Qase

If you encounter a defect during a test run, you can either create a new Github issue directly from Qase or link an existing Github issue.

  • In the test run, mark your test case as Failed, Blocked, or Invalid and proceed with creating a Defect

  • In the Defect creation form, under “Choose Integrations”, select “GitHub App” and click “Add defect”

  • Choose the GitHub repository to create an issue in, then hit “Create”

    Creating a GitHub issue from the defect form while failing a case in a run

  • Or select the Link tab at the top and select your repository search for the issue and click on “Link”.

    Linking an existing GitHub issue from the Link tab of the defect form

  • In the Qase Defect, you will now have a connected GitHub issue link

  • The statuses of the Qase Defect and the connected GitHub issue synced, meaning marking one as closed resolves the other (and vice versa).

2. Linking existing issues

In addition to creating new GitHub issues, you can also link test cases, runs, and defects to a GitHub issue -

a. Linking Test cases

  1. In the repository, click on the test case you want to link the GitHub issue to.

  2. Switch to the properties tab in the preview window.

  3. Scroll down and click on “Link GitHub app issue”

  4. In the modal window, select your repository, search for the issue, and click “Link”.

Linking a GitHub issue to a test case from its Properties tab

b. Linking Test runs

  1. In the Test runs view, click on the run you want to link the GitHub issue to.

  2. In the Run dashboard, to the bottom right, find the button 'Select an integration' under External issue.

  3. In the modal window, select your repository, search for the issue, and click “Link”.

Linking a GitHub issue to a test run from External issue on the run dashboard

c. Linking defects

  1. In the Defects section, click on a defect you want to link the GitHub issue to.

  2. Inside the Defect view, find the “Link with Apps” dropdown on the bottom right and select “GitHub App”.

  3. In the modal window, select your repository, search for the issue, and click “Link”.

Linking a GitHub issue to a defect from the Link with apps dropdown

CI/CD Workflow

a. Connect your GitHub Workflow

Follow these steps to connect a GitHub workflow to Qase:

  1. One of Qase reporter apps should be used in order to receive the test run results.

  2. Create a token in Qase and add it to the QASE_API_TOKEN secret in your GitHub repository settings.

    The QASE_API_TOKEN secret on the repository's Actions secrets and variables page

  3. The inputs and env variables that are required need to be defined in a workflow:

name: Qase Tests
on:
workflow_dispatch:
inputs:
qase_api_base_url:
description: 'Qase API URL'
required: true
qase_report:
description: 'Enabled/disabled reporting to Qase'
required: true
qase_project_code:
description: 'Qase project code'
required: true
qase_run_id:
description: 'Qase Run ID'
required: true
qase_run_complete:
description: 'Qase Run autocomplete'
required: true
env:
QASE_API_BASE_URL: ${{ inputs.qase_api_base_url }}
QASE_TESTOPS_PROJECT: ${{ inputs.qase_project_code }}
QASE_TESTOPS_RUN_ID: ${{ inputs.qase_run_id }}
QASE_TESTOPS_RUN_COMPLETE: true
QASE_TESTOPS_API_TOKEN: ${{ secrets.QASE_API_TOKEN }}

Step 4. Add a step to the first place in the job. It allows to link a GitHub workflow run with a Qase Test run.

jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: cskmnrpt/qase-link-run@v2
env:
QASE_TESTOPS_API_TOKEN: ${{ env.QASE_TESTOPS_API_TOKEN }}

Step 5. Add additional steps to execute your tests.

b. Start the Automated pipeline from Qase

After the workflow is connected, you can initiate automated test runs from Qase:

  1. From the Test runs screen, click “Start a new Test run”, and choose the type as 'Automated'

    Starting a new test run and choosing the Automated type

  2. Choose a CI/CD system to use (Github):

    Choosing Github App as the CI/CD system for the run

  3. Fill in the required fields:

    Filling in the fields the GitHub workflow needs before the run starts

  4. Click “Start a run” button.

  5. You will be redirected to a test run you started. In the Test Run details section, you will see a link to the workflow run in GitHub and the current status.

    The run details with a link to the GitHub workflow run and its current status

  6. When the tests have been executed, the Test Run will contain all the results sent by a reporter (it should be properly configured):

    The finished test run holding all the results sent by the reporter

GitHub Actions

GitHub Actions allows for reusable functions and workflows, enhancing automation and efficiency.

Qase offers the following actions, which can be integrated into your workflows to streamline tasks.

Troubleshooting:

If integration with GitHub has already been enabled before, it’s required to accept new permissions in the GitHub application settings.

In case of insufficient permissions after clicking on the “Start a run” button, a message with an error will appear.

The new run dialog warning that working with GitHub workflows needs extra permissions

Useful resources:

Did this answer your question?