3.2.1 GitHub Integration

 

When qTest Pulse is integrated with GitHub, all of your test cases will be stored and versioned in GitHub. If your continuous integration (CI) tool, such as Jenkins or Bamboo,  is integrated with GitHub, test run results will trigger new builds and be reported as xUnit or JUnit. This gives your executions the ability to fail your automated builds.

There are three parts to configuring your GitHub integration:

  • Enter GitHub credentials
  • Configure Test Case Library Repository  -  This will determine where your test cases are stored and their format.
  • Configure Generated Stubs -  Pulse will use this information to commit test results to your VCS in a format that can be interpreted by your test runner.
  • Configure GitHub to send events to Pulse 

To setup the integration between Pulse and GitHub, open your Project Settings page

github_int_1.png

Then select Version Control.

 VCS.png

1. Enter GitHub Credentials

  • Select GitHub from the Version Control System dropdown
  • Enter your Git Project Username and Password. The user should have access to the repository that you want to use.

 

2. Configure Test Case Library Repository

TCL.png

Fields to complete:

GitHub Organization: Your organization name

Test Case Library Project Name: Enter the project you want all of your test cases for this Pulse project to be saved. This can be the same project as your code under test or a separate project.

Test Case Library Template Default Branch: Enter the default branch for your test cases

Test Case Library Template Path: This is the location your test cases will be stored. You will not need to create this path in GitHub beforehand, the system will automatically create the path if it is not existing.

Test Case Library  Template File Extension: Test cases will be saved in this format.

Popular extensions:

  • Cucumber - .feature
  • Typescript - .spec.ts
  • Robot - .robot
  • Markdown - .md

Test Case Library Template: Input your template for Test case file. Test Case Templates allow you to map test case fields to a certain format that can be interpreted by your test runner. For example, you can map the pre-condition in a test case to be a “Given” statement in a Gherkin scenario.

Use the syntax ${testcase.<propertyname>} in your template to specify test case's properties.

Example: ${testcase.name} for test case's name, ${testcase.preCondition} for test case's precondition.

You can refer to this link for all available Test case properties.

3. Configure Generated Stubs

When Pulse test cases are ran, Pulse generates an output that can be interpreted by test runners. They can pass or fail your builds. The location and format of that output can be configured in this section.

stubs.png

Fields to complete:

Git Working Project Name: The repository where the execution results will be stored. It can be the same or a different repository than your Test Case Library.

Project Path for Generated Test Cases: Location in your Repository where you want the generated Test Case files stored. You will not need to create this path in GitHub beforehand, the system will automatically create the path if it is not existing.

Generated Test Case File Extension: Test Case file extension (e.g ".spec.ts" for typescript)

Generated Test Case Branch: Branch to which generated Test case files will be committed

Generated Src Template: Input your template for Test case file.

 

Use the syntax ${testcase.<propertyname>} in your template to specify test case's properties.

Example: ${testcase.name} for test case's name, ${testcase.preCondition} for test case's pre-condition.

You can refer to this link for all available Test case properties.

4. Configure GitHub to send events to Pulse 

For Pulse to track the results of your automated tests, GitHub needs to be configured to send events to Pulse. This integration is setup by configuring a webhook within GitHub. For steps on how to access the webhook configuration in GitHub, click here

Options to select within GitHub:

Payload URL: Copy the webhook URL on the accounts tab of the Version Control section within Pulse. Each project has it's own URL. 

webhook.png

Content Type: Select application/json

Secret: Leave this field blank 

Which events would you like to trigger this webhook: Select Send Me Everything 

After finishing to fill all needed information, click the Submit button.