Zephyr for JIRA Test Management (2024)

Zephyr for JIRA Test Management (1){width="130"height="38"}

Creates test cases and publishes test results inZephyr forJIRAfor JUnit test cases

About the Plugin

Zephyr for JIRA Plugin for Jenkins integrates Jenkins and Zephyr forJIRA – Test Management for JIRA Cloud and JIRA Server / Data Centerdeployments. This plugin creates test cases and publishes test resultsin JIRA for JUnit test cases in Jenkins. It supports publishing mavensurefire format test results (JUnit and TestNG).

This guide will cover how to create and execute test cases automaticallyin Zephyr for JIRA – Test Management using this plugin; this includes

  1. Downloading and installing the plugin.
  2. Adding JIRA Severs in the Jenkins global settings.
  3. Configuring a standard Jenkins Job.
  4. Configuring Zephyr for JIRA Plugin job as a post build action.
  5. Triggering the job and publishing results in JIRA.

Requirements

  1. Zephyr for JIRA – Test Management Server/Data CenterDeployment[Version 2.5.2 (Build 25201808) or higher] installed and enabledon JIRA server or CloudDeploymentinstalled and enabled on JIRA Cloud .
  2. ZAPI Server/Data CenterDeployment[version 1.5 or higher] installed and enabled on JIRA server orCloudDeploymentinstalled and enabled on JIRA Cloud.
  3. Jenkins installation

Adding JIRA Servers in Jenkins global settings

After installation configure Jenkins global settings to establishconnection with JIRA Server(s). Follow the below steps

  • Launch Jenkins and access via a web browser.

  • Click on "Manage Jenkins" from the Menu as illustrated in the belowscreenshot.

Zephyr for JIRA Test Management (2){width="234"height="280"}

  • Click on "Configure System".

Zephyr for JIRA Test Management (3){width="300"}

  • Locate the section “Zephyr for JIRA – Test ManagementConfiguration”. Select applicable JIRA deployment and click “Add”.You can add more than one JIRA Server / JIRA Cloud instances byclicking on “Add” button.Zephyr for JIRA Test Management (4)
  • For JIRA Server / Data Center deployment, populate JIRA Server /Data Center URL and user credentials. Note that the User Name andPassword must be that of a user with appropriate permissions toproject(s). Click on “Test Configuration” to validate connection toJIRA. Click on “Save” button to save the configuration changes.

Zephyr for JIRA Test Management (5)

  • For JIRA Cloud deployment, populate JIRA Cloud URL, Zephyr Base URL,user credentials and Zephyr for JIRA Cloud Access and SecretKey.Note that the User Name and Password must be that of a user withappropriate permissions to project(s). Click on “Test Configuration”to validate connection to JIRA. Click on “Save” button to save theconfiguration changes.Zephyr for JIRA Test Management (6)

A job in Jenkins defines a sequence of tasks for Jenkins to perform.When a job is triggered, Jenkins looks for an Ant script or Maven buildfile and runs it. It also provides options to define post-build tasks.Follow the example below to configure a standard job and add a postbuild action:

  1. Create a new Jenkins job by clicking the "New Item" link found onthe menu.

Zephyr for JIRA Test Management (7){width="247"height="275"}

2. Give a name for your job, check the box "Freestyle project" and clickon "OK" button.

Zephyr for JIRA Test Management (8){width="624"height="248"}

3. To configure the job you just created, click the <job name> on theJenkins home page.

Zephyr for JIRA Test Management (9){width="624"height="155"}

4. Click the "Configure" link.

Zephyr for JIRA Test Management (10){width="280"height="327"}

5. Choose "Subversion" option in the "Source Code Management" section.

Zephyr for JIRA Test Management (11){width="381"height="140"}

6. Enter the subversion URL where the target project resides and pressTab.

Zephyr for JIRA Test Management (12){width="624"height="192"}
Note: User credentials needs to be setup to access SVN server. Click on"enter credential" link to set it up if you see below error.
Zephyr for JIRA Test Management (13){width="539"height="62"}

7. To add a build step, locate the "Build' section and select "Invoketop-level maven targets" from the "Add build step" dropdown.

Zephyr for JIRA Test Management (14){width="427"height="214"}

8. Select "clean package" as your Goals.

Zephyr for JIRA Test Management (15){width="624"height="73"}

9. The plugin requires JUnit test result. Locate the "Post-buildActions" section and select "Publish JUnit test result report" from "Addpost-build Actions" dropdown.

Zephyr for JIRA Test Management (16){width="539"height="186"}

10. Enter the path to the test report. In the example below the locationis "Proj1\target\surefire-reports/*.xml" where Proj1 is the targetproject.

Zephyr for JIRA Test Management (17){width="624"height="145"}

In order to publish results in Zephyr for JIRA, define anotherpost-build action.

  1. Select "Publish test result to Zephyr for JIRA" from "Add post-buildActions" dropdown.

Zephyr for JIRA Test Management (18){width="532"height="196"}

2. Configure Zephyr plugin job.

Zephyr for JIRA Test Management (19){width="615"height="260"}

      1. Select the JIRA URL from the dropdown. (Servers configuredin the Jenkins global configuration are available here toselect). This automatically pulls in projects, versions andcycles.
      2. Select the Project Name from the dropdown. This re-populatesthe versions.
      3. Select the Version from the dropdown. Selecting a versionfetches all its cycles.
      4. Select either an existing Cycle from the dropdown or createa new cycle.
      5. For existing Cycle the default Cycle Duration will be thatof existing cycle in Zephyr and Cycle Name Prefix will be ofthe format "Automation_<Date><Time>" stamp.
      6. For new cycle you have option to select Cycle Duration fromthe dropdown and to edit default cycle prefix name"Automation". In the absence of a cycle prefix name"Automation" is used for new cycles.
      7. Click "Save".

To trigger a job manually, click "Build Now" link on the menu. Thisbuilds the project and publishes the Junit result.

Zephyr for JIRA Test Management (20){width="161"height="178"}

Jenkins creates the test cases in the selected JIRA Project.

Zephyr for JIRA Test Management (21){width="624"height="259"}

Finally, Jenkins assigns these test cases to the selected cycle andexecutes all the tests.

Zephyr for JIRA Test Management (22){width="624"height="259"}

License

This plugin is open source. It follows the Apache License version 2.0(<http://www.apache.org/licenses/>) It means:
It allows you to:

  • freely download and use this software, in whole or in part, forpersonal, company internal, or commercial purposes;
  • Use this software in packages or distributions that you create.

It forbids you to:

  • redistribute any piece of our originated software without properattribution;
  • use any marks owned by us in any way that might state or imply thatwe www.getzephyr.com endorse yourdistribution;
  • Use any marks owned by us in any way that might state or imply thatyou created this software in question.

It requires you to:

  • include a copy of the license in any redistribution you may makethat includes this software;
  • provide clear attribution to us,www.getzephyr.com for any distributionsthat include this software

It does not require you to:

  • include the source of this software itself, or of any modificationsyou may have made to it, in any redistribution you may assemble thatincludes it;
  • Submit changes that you make to the software back to this software(though such feedback is encouraged).

See License FAQ <http://www.apache.org/foundation/licence-FAQ.html>for more details.

Zephyr for JIRA Test Management (2024)
Top Articles
Latest Posts
Article information

Author: Velia Krajcik

Last Updated:

Views: 6053

Rating: 4.3 / 5 (54 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Velia Krajcik

Birthday: 1996-07-27

Address: 520 Balistreri Mount, South Armand, OR 60528

Phone: +466880739437

Job: Future Retail Associate

Hobby: Polo, Scouting, Worldbuilding, Cosplaying, Photography, Rowing, Nordic skating

Introduction: My name is Velia Krajcik, I am a handsome, clean, lucky, gleaming, magnificent, proud, glorious person who loves writing and wants to share my knowledge and understanding with you.