Skip to main content

GitHub

Updated over a year ago

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.

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:

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.

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


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"

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

  • 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".

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

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

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.

  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 }}

  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 }}

  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'

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

  3. Fill in the required fields:

  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.

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

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.

Useful resources:

Did this answer your question?