Jenkins Integration

Applies to Zephyr Scale Cloud, last modified on June 11, 2021.

Jenkins is a continuous integration tool that helps with the deployment of software projects. Through this, you can run automated tests while building a project, and monitor the results.

The Zephyr Scale Jenkins plugin enables a task that reports on Zephyr Scale automated test results.

The plugin supports Jenkins: 2.138.4 and above.

Workflow: Zephyr Scale and Jenkins

Here's how the components work together:

Installing the Plugin

  1. On the Jenkins home page, click Manage Jenkins.
  2. Click Manage Plugins.
  3. Switch to the Available tab.
  4. Search for zephyr and select the Zephyr Scale plugin.
  5. Click Install without restart.

Setting Up the Plugin for Jenkins

Once you've installed the plugin, follow these steps to set it up:

  1. Go to the Jenkins home page.
  2. Click Manage Jenkins.
  3. Click Configure System.
  4. Scroll to the Zephyr Scale section, click Add, select Zephyr Scale Cloud and enter your API key for Zephyr Scale Cloud.
  5. Click Test Configuration to ensure that the connection is valid.
  6. Once valid, click Save.

Publishing Jenkins Test Results to Zephyr Scale

The post-build task explained here helps you configure the publishing of Jenkins automated-test results to Jira once a project build completes.

  1. On the Jenkins dashboard, click your project.
  2. Click Configure in the sidebar.
  3. Click Post-build Actions to fast-scroll to the Post-Build Action section.
  4. Click Add post-build action and select Zephyr Scale: Publish Test Results from the list:

    A new section appears with the configuration fields.

  5. Complete the configuration fields:
    • Jira instance - The URL of your Jira Cloud instance.
    • Project key - The Jira project key where the results will be sent.
    • Test framework - Select either Cucumber or Zephyr Scale Output Result for JUnit.
    • File path - The file path for the results file that is generated from the automated tests.
    • Automatically create non-existing test cases (optional) - This creates a relationship with the test case key used to annotate a test within a development project.

  6. Click Save.

Running BDD Test Cases in Jira

This build task pulls existing BDD test cases from Zephyr Scale. When you execute these tests within Jenkins, the results are then sent back to Zephyr Scale.

To enable this task to run before a build takes place, complete the following steps:

  1. On the Jenkins dashboard, click your project.
  2. Click Configure in the sidebar.
  3. Scroll down to the Build section and click Add build step.
  4. Select Zephyr Scale: Download Feature Files from the list:

    A new section appears with the configuration fields.

  5. Complete the configuration fields:
    • Jira instance - The URL of your Jira Cloud instance.
    • Project key - The Jira project key where the results will be sent.
    • Target path - The file path for the results file that is generated from the automated tests.

  6. Click Save.
Highlight search results