9.2 Configuring qTest Plugin for Jenkins

  Important:

  • Our plugin does not execute your unit tests. It only collects and submit test results (if any) to qTest.
  • It supports any testing frameworks which are capable of generating JUnit XML format test reports.
  • If your testing framework does not generate JUnit XML format test reports, you can utilize xUnit Plugin to generate and publish test results before qTest Plugin collects and reports them to qTest.

»Installing qTest Plugin on Jenkins server

»Configuring qTest Plugin on Jenkins server

Installing qTest Plugin on Jenkins server

  1. Access to Plugin Manager page on your Jenkins tool.
  2. Search for qTest Plugin and install it.
Jenkins - Install

Configuring qTest Plugin on Jenkins server

  Prerequisites:

  • Your testing framework is capable of generating JUnit XML format test reports.
  • Otherwise, you can utilize xUnit Plugin to generate and publish test results before qTest Plugin collects and reports them to qTest. After installing it, add Publish xUnit test result report as a post-build action.

      Remember to uncheck the option Delete temporary JUnit files.

    xUnit
  1. While configuring the build project in your Jenkins server, add Submit JUnit Test Results to qTest as a post-build action.

      If you have added Publish xUnit test result report, add Submit JUnit Test Results to qTest following it.

  2. Jenkins - add post-build action - Submit JUnit test results to qTest
  3. After the step is added, you will need to configure it so that it can connect and submit test results to your qTest project.
    Jenkins - add post-build action - Submit JUnit test results to qTest - Configure step
    • qTest URL: the URL to access your qTest instance.
    • API Key: the token to login to your qTest instance. You can get the Jenkins API Key from qTest Resources page.
      qTest - Resources - Jenkins - API Token
  4. Click on Retrieve button then select values for these fields:
    • Project: select one qTest project which the build is integrating with.
    • Release: select one Release which will be the target release of submitted Test Runs.
    • Environment: It is not required. The selected Environment will be set as submitted Test Runs' property.
  5. Specify how the plugin will scan your test results. There are 2 options:
    • Parse test results from testing tools (default): the plugin will scan for the XML files which contain the test results. You can optionally specify a directory pattern where these XML files are located, using ANT Style Pattern. If not specified, the plugin will scan the whole project.
    • Utilize test results from the CI tool: In case there is one of the prior tasks has already scanned and published test results to Jenkins, our plugin will utilize the test results without scanning again.

       Important:

      • For Maven projects: it is not required that there is a prior task to publish test results to Jenkins.
      • For Freestyle and Multi-configuration projects: it is required that there is a prior task to publish test results to Jenkins. If not, no test results will be submitted to qTest and Submission Status will show the status as SKIPPED for the builds.
    CI - CI plugin - Parse test result options
  6. Specify how to create Test Cases in qTest.
    • Each JUnit Test Suite (class) = a qTest Test Case: it is the default option. A qTest Test Case is created from a JUnit Test Suites (class)
    • Each JUnit Test Case (method) = a qTest Test Case: A qTest Test Case is created from a JUnit Test Case (method)

  Notes:

  • The selected Environment only affects the newly created Test Runs. It will not update the existing Test Runs with the new Environment if you have selected a new one. We are working on the fix for that and will release it soon.