Configuring Jenkins

Applies to Zephyr Scale Server/Data Center 8.0, last modified on March 25, 2021

The two tasks in this topic guide you through the initial steps for using Jenkins with Zephyr Scale.

Create a feature file

  1. Open a test case, then click the Test Script tab.

  2. Select BDD - Gherkin from the Type dropdown.
    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.

Instal the Zephyr Scale plugin for Jenkins

  1. Navigate to the Manage Plugins page, and install the Zephyr Scale plugin on your Jenkins instance. You can also download the Jenkins plugin here: https://plugins.jenkins.io/tm4j-automation.

    Installing the Zephyr Scale plugin

    Click the image to enlarge it.

  2. Click Manage Jenkins, and scroll to the Zephyr Scale section.

  3. Enter the details for your Jira instance, test the connection, then click Add.

    Zephyr Scale plugin settings

    Click the image to enlarge it.

  4. Select your Jenkins project, then click Configure.

    Configure project

    Click the image to enlarge it.

  5. Scroll to the Build section, select Zephyr Scale: Export BDD test cases from the Add Build Step dropdown, then fill out the following details and click Apply:

    • Jira Instance - One of the preconfigured Jira instances. If you do not have any, please go to General Configuration and set up a new Jira instance.

    • Project Key - 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.

  6. Scroll to the Post-Build Actions section, select Zephyr Scale: Publish Test Results from the Add Post-Build Action dropdown, then fill out the following details:

    • Jira Instance - One of the preconfigured Jira instances. If you do not have any, please go to General Configuration and set up a new Jira instance.

    • Project Key - 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.

      Post-Build Actions section

      Click the image to enlarge it.

  7. (Optional) Check Automatically Create Non-Existing Test Cases if you want to create a test case for a test where a test case key is not provided.

    Automatically Create Non-Existing Test Cases

    Click the image to enlarge it.

  8. Click Apply, and then click Save.

See Also

Integrations
Jenkins Integration

Highlight search results