Leapwork Test Automation is often used in conjunction with Test Management products. This document describes the integration between Leapwork Test Automation and Zephyr Scale Test Management.
Leapwork’s no-code Test Automation technology makes it quicker and easier for regular business users and IT teams to adopt, so that they can scale automation faster - ultimately empowering quality assurance teams, leading to shorter test cycles and immediate return on investment. This means that enterprises can continue to grow and optimize their performance because they can rely on their business software to work as it should, with test automation as an integral part of their software development lifecycle.
Jira Zephyr Scale
The role of software testing is becoming increasingly important in the software development lifecycle to ensure that software is released with the highest possible quality. With an increased amount of testing, more advanced test plans and strategies, it is evident that a proper test management tool is needed. Zephyr for Jira is a Test Management tool that provides the structure to organize, plan, and report with accuracy on the progress of testing as well as the readiness to deploy.
CI-CD Pipeline implementation of the Continuous Integration/Continuous Deployment software is the backbone of the modern DevOps environment. Most of the organization using DevOps practices and using Jenkins. Jenkins is an open source CI tool which can be used to execute the Leapwork tests. Jenkins is a Continuous Integration tool which does this verification periodically or whenever the developer pushes the code to the repository.
Both Leapwork and Jira Zephyr integrate natively with Jenkins, and so with each other.
Picture 1: Example of Leapwork reporting in Zephyr
Both the Jira Zephyr and Leapwork plugins are installed from within the Jenkins “Plugin” store.
Open Manage Jenkins -> Manage Plugins
Picture 2: Plugin configuration in Jenkins
Leapwork plugin for Jenkins: Leapwork Integration
Jira Zephyr integration: Zephyr Scale Plugin
Picture 3: Leapwork Plugin in Jenkins
This chapter will describe the configuration of the different components in Leapwork, Zephyr and Jenkins.
Jira Zephy configuration
Before configuring the Jenkins pipe, two things need to be configured in Jira Zephyr:
The authentication for Jenkins.
Jenkins will create the tests and update the test cycles on behalf of the Leapwork server. It therefore makes sense to create a new user in Jira called “Leapwork Server” or similar. After creating the user, goto the “Zephyr API Keys” (Your Profile and settings -> Zephyr Scale API access tokens), and create a new key for Jenkins.
NOTE: The Zephyr API keys are not the same as Jira API Keys!
Picture 4: API Keys in Zephyr
The Leapwork configuration is limited to:
- Creating an API key. (Settings-> API access Keys). Make a note of the key
- A Runlist. Create a runlist with required test (flows).
- A Schedule Create an “on Demand” schedule and make a note of the name.
Picture 5: Run lists in Leapwork
First step in Jenkins is to configure the Jira Zephyr server instance. In Jenkins go to:
Manage Jenkins -> Configure System
When the Zephyr plugin is configured correctly you will find an “Zephyr Scale” Configuration section. Configure the server URL and provide the API key. Use the “test connection” button to test the configuration.
Picture 6: Zephyr scale application configuration in Jenkins
Then press “New Item” button in Jenkins. A logical name could be similar to the Runlist \ Test plan names. Next to optional other configuration, press the “Add build step” button and select “Leapwork integration”. The Leapwork plugin will appear. Configure the following steps:
Picture 7: Leapwork plugin configuration in Jenkins
After configuring the Leapwork Plugin you may configure the Zephyr Scale plugin. Press the button “Add post-build action” and select “Zephyr Scale: Publish Test Results”. Configure the following steps:
Picture 8: Zephyr plugin configuration in Jenkins
Leapwork Jira Zephyr integration in action
After configuring the plugins, one or more release pipelines can be configured in Jenkins in order to launch the automated tests, and report the results back to Zephyr.
Step 1: Trigger CI/CD Pipeline
In order to launch (start) the pipeline you can press the “Build now” button associated with the just created pipeline.
Step 2: Execution of Jenkins pipeline
The progress of the Jenkins pipeline can be monitored by means of the console output: Pipeline\Instance\Console output
The Leapwork Automated tests could run for quite some time (depending on the test requirements). During this period the Jenkins job will keep polling the Leapwork server for results. The polling interval is based on the Leapwork plugin configuration.
During each server request the following text will be displayed:
“The schedule status is already 'Executing' - wait a minute...”
The default polling interval is 5 seconds.
Picture 9. Sample console output Leapwork automated tests.
Step 3: Creation or update of Jira Zephyr “Tests”.
When the Jenkins pipeline is finished, the Zephyr plugin will create or update a “test” for each flow which was part of the runlist.
Picture 10: Test cases in Zephyr. Each test case corresponds with a Leapwork flow
The “Execution” section will contain an instance for every time the flow (test) was executed:
Picture 11: Test case in Zephyr. Execution details
For each execution, the flow (test) details can be retrieved:
Picture 12: Zephyr Test details page with Leapwork keyframes.
Step 4: Creation of associated Jira Zephyr “Test Cycle”
The associated Jira Zephyr “Test Cycle” is created, and will display the latest test results per flow (tests):
Picture 13: Zephyr Test Cycle
For any clarification, please contact our Priority Support.