Menu

Version Control Integration

GitHub Integration

When qTest Pulse is integrated with GitHub, all of your test cases will be stored and versioned in GitHub. If your CI tool is integrated with GitHub, test run results will be outputted in a test runner output and trigger new builds. Failed test cases will show as automated testing results and be reported in your build report.

Access Version Control tab by opening your Project Settings page and select the tab Version Control.

projectSettings.png

vcsconfig.png

You will need to input into 3 sections as follows:

  • Your GitHub Host and credentials
  • Repository for generated Test case files. Pulse will use this information to commit source file into GitHub whenever a test case is executed in Pulse.
  • Repository for Test case Template. Pulse will use this information to commit test case into GitHub whenever it is created in Pulse.

Then, configure Webhook in your GitHub Repository in order for it to push events in your repository back to your Pulse project. 

GitHub Host and Credentials.

  1. Select GitHub from the VCS Type drop-down
  2. Type in your GitHub Host, Organization, and credentials. They are all required fields in order for Pulse to connect to GitHub.

githubhost_credentials.png

2. Repository for generated Source File

- Git Working Project Name: Your repository

- Unit Testing Framework: Select your testing framework. There are currently 4 supported options: mocha, jasmine, junit 4+, cucumber

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

repoforGeneratedTC1.png

3. Repository for Test case Library Template

- Git Test Case Library Project Name: Your repository. It can be the same or different with Repository of Test Case File (in step 2 above)

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

- File Extension for Test Case Templates: e.g "md" for markdown

- Project Branch for Test Case Library Templates: Branch to which generated Test case Template will be committed.

- Test Case Library Templates: If you don’t put a template, the default is Gauge markdown.

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.

repoforTCLibraryTemplate1.png

After finishing to fill all needed information. Click Save button.

From now, when you create a Test case in your project in Pulse, a test case template will be committed to GitHub. When you execute a Test case, a test case source file will be committed to GitHub.

GitHub Configuration - Example

This example tries to demonstrate a typical flow from setting up a CVS configuration in Pulse project to generating and committing test case template/files into GitHub.

1. Set up GitHub Host and Credentials

setup1.png

2. Repository for generated Source File

setup2.png

 3. Repository for Test case Library Template

setup3.png

4. Create Test Case in Pulse

  • In Pulse, create a Test Case named "login successfully"
  • A file name "login successfully.md" has been generated and committed to according repository in GitHub. Its content generated following the format that you setup in the field "Test Case Library Templates" of section 3.

testcase.png

ex1.png

5. Execute the test case

  • In Pulse, execute and fail the test case
  • A test case source file named "login successfully.spec.ts" will be commited to GitHub. Its contents is generated following the format you define in the field "Generated Src Template" of section 2.

execute.png

 ex3.png

Configure Webhook in GitHub Repository

This section demonstrates how to configure webhook in your GitHub repository in order for Pulse to be notified when certain events happen within your repository.

  1.  Scroll down to the bottom of the page and copy the system-generated URL.copywebhookurl.png
  2. Open Webhooks setting in your Repository in GitHubwebhook1.png
  3. Add webhook
  • Paste the copied URL into Payload URL field.
  • Select option "application/json" in Content-Type drop-down 
  • Select option "Just the push event" as events you would like to trigger the webhook
  • Click button Add Webhookwebhook2.pngdone.png
Subscribe To Our Blog
Powered by Zendesk