Configuring Jenkins

Applies to Zephyr Scale Server/Data Center 8.4, last modified on July 22, 2021

This guide walks you through the initial steps for using Jenkins with Zephyr Scale.

Create a feature file

  1. In Zephyr Scale, open a test case and switch to the Test Script tab.

  2. Select BDD - Gherkin from the Type list.
    The Gherkin editor appears.

  3. Write your test case.
    Remember not to include Feature or Scenario.

    Creating test case

    Click the image to enlarge it.

  4. Click Save when you are finished, and close the test case.

  5. Click More and select Export Feature Files (BDD - Gherkin) to download the feature file for your new test case (or the selected test cases).

    Exporting feature files

    Click the image to enlarge it.

    The zip file downloads to your computer. Developers using your company’s supported BDD tool can reference this information when writing automated tests related to the test case.

Install the Zephyr Scale plugin for Jenkins

  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.

    Installing the Zephyr Scale plugin

    Click the image to enlarge it.

  5. Click Install without restart.

You can also download the Zephyr Scale Jenkins plugin from here:

https://plugins.jenkins.io/tm4j-automation/

Configure the plugin

  1. On the Jenkins home page, click Manage Jenkins.

  2. Click Configure System.

  3. Scroll to the Zephyr Scale section, click Add, and select Zephyr Scale Server.

  4. Enter your Jira Server URL and credentials. Click Test Configuration to validate the details, then click Save.

    Zephyr Scale plugin settings

    Click the image to enlarge it.

Publish 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. Select your Jenkins project, then click Configure.

    Configure project

    Click the image to enlarge it.

  2. Scroll to the Build section.

  3. Click Add build step and select Zephyr Scale: Download Feature Files from the list.

  4. Specify the following information:

    • Jira instance - One of the preconfigured Jira instances. If you do not have any, please go to Manage Jenkins > Configure System to set up and configure Jira instances.

    • Project key - The Jira project key used to filter test cases.

    • Target path - The path where the exported feature files are to be placed.

    Build section

    Click the image to enlarge it.

  5. Click Apply.

  6. Scroll to the Post-Build Actions section.

  7. Click Add Post-Build Action and select Zephyr Scale: Publish Test Results from the list.

  8. Specify the following information:

    • Jira instance - One of the preconfigured Jira instances. Go to Manage Jenkins > Configure System to set up and configure Jira instances.

    • Project key - The Jira project key used to filter test cases.

    • Test framework - The test framework where the test results are to be generated from.

    • File path - The path where the build places generated test result files. You can also use Ant-style patterns, such as */test-reports/.json.

    • (Optional) Select Automatically create non-existing test cases to automatically create a new case for a test when a test case key is not provided.

    Post-build actions section

    Click the image to enlarge it.

  9. Click Save.

See Also

Jenkins Integration
Integrations

Highlight search results