If you use Zephyr to plan and monitor your testing efforts and use Jenkins to run your automated TestComplete tests, you may want to include your TestComplete test results in your test reports and metrics in Zephyr.
There are several way to do this:
Approach 1: Use TestExecute integration with Zephyr Squad
Applicable only if you use TestExecute version 14.10 and Zephyr Squad.
Requirements and Prerequisites
-
Supported Jira versions
Jira Cloud
– or –
Jira Server 7.2.x–7.13.x
– or –
Jira Data Center 7.2.x–7.13.x
-
Your Jira must have the following plugins installed:
-
TestExecute version 14.10 (or later)
-
The Zephyr Integration Plugin must be enabled in TestExecute. By default, the plugin is installed and enabled automatically when you install TestExecute. If you experience issues with the Zephyr integration, make sure the plugin is enabled in the File > Install Extensions dialog (you can find the plugin in the Common group).
-
Your TestExecute workstation must have access to your Jira project.
- Your Jenkins server must have the TestComplete Support plugin installed.
How to send results
-
Open your project in TestComplete. If your project does not have test items, create them. TestExecute can send the results of only test items to Zephyr. To learn how to create test items and assign tests to them, see the TestComplete documentation.
-
In TestComplete, open the Properties > Zephyr page of your project and bind the project to your Jira project:
-
To send test results to your Jira project, you need to specify the release versions and the test cycle to which you want to add them.
You can do this directly in the TestComplete project:
As an alternative, you can do this later when configuring your Jenkins job or pipeline (see below).
-
In the Execution Plan editor of your project, in the Report To column, bind your project’s test items to Zephyr tests in your Jira project:
-
In Jenkins, configure your job or pipeline to run your TestComplete project’s test items. To learn how to do this, see the following topics:
-
If you didn't specify your Jira project’s release version and test cycle when configuring your TestComplete project, you can do this now. Use the
ZephyrVersion
andZephyrCycle
command-line arguments of TestExecute.If you use a freestyle job, to specify the release and test cycle, use the Advanced > Additional command line arguments property of the TestComplete Test build step:
If you use a pipeline, use the
commandLineArguments
property of the TestComplete Test step:Note: If you specified a test cycle neither in your TestComplete project, nor in your Jenkins job or pipeline, TestComplete will send the test results to the default Ad hoc test cycle of the specified release. If you specified a release version neither in your TestComplete project, nor in Jenkins, TestComplete will send the test results to the default Unscheduled release.
-
In Jenkins, run your job or pipeline.
-
TestExecute will run the tests, send their results to Jira and assign them to the specified Zephyr tests:
If the test run fails, information on the first error posted to the test log will be added to the test execution’s comment section:
Approach 2: Use Zephyr integration with Jenkins
Applicable if you use Zephyr Squad or Zephyr Enterprise.
Not applicable for Jenkins Pipeline.
Requirements and Prerequisites
-
Zephyr Cloud or Zephyr Enterprise versions 4.7.x–6.2.x.
-
Your Jenkins must have the following plugins installed:
-
Your Jenkins server must be configured to access your Zephyr server. To learn how to do this, please see the documentation for your version of the Zephyr Test Management plugin.
How to send results
-
In Jenkins, configure your job to run your TestComplete tests. To learn how to do this, see Configuring Jenkins Freestyle Jobs to Run TestComplete Tests:
-
Important: Configure your job to export test results to JUnit-style reports. To do this, enable the Advanced > Generate JUnit-style report property of your TestComplete Test build step:
Otherwise, Jenkins will not be able to publish test results to Zephyr.
-
Configure your Jenkins build to post test results to Zephyr after the build is over:
For detailed instructions on how to do this, see the Configuring plugin as a post-build action section in the documentation for your plugin version on the Jenkins web site:
plugins.jenkins.io/zephyr-enterprise-test-management (for Zephyr Enterprise plugin)
plugins.jenkins.io/zephyr-for-jira-test-management (for Zephyr Squad plugin)
-
Run your build.
-
TestExecute will run the tests and export the test results.
-
The Zephyr Test Management plugin will capture the exported test results and send them to Zephyr.
For each executed test, the plugin will create a test case and assign test results to it:
The name of the created test case includes the name of the TestComplete project suite, project and executed test.
If the name of the executed test matches the name of an existing test case, the plugin will not create a new test case. It will add a new test execution to the existing test case.
See Also
Integration With Jenkins
Preparing Jenkins Nodes for Running Tests
Configuring Jenkins Freestyle Jobs to Run TestComplete Tests
Configuring Jenkins Pipelines to Run TestComplete Tests