JUnit Integration

Applies to Zephyr Scale Cloud, last modified on November 18, 2020.

Annotating JUnit tests in a Zephyr Scale development project enables results to be sent from JUnit directly to Jira. All it takes is a pre-made script within a task.

This topic illustrates the workflow, explains how to configure the Zephyr Scale library for JUnit tests, and walks you through how to properly annotate JUnit tests.

Workflow: Zephyr Scale and JUnit

Here's how the components work together:

Configure the Zephyr Scale Library to Receive JUnit Test Results

  1. Download the Zephyr Scale/Junit integration repository from our Bitbucket.
  2. Add the automation library to your project by following the instructions in the README section.
    This enables you to annotate your JUnit tests with a Zephyr Scale key or name and generate a custom report when you run tests.

    To send the test results to Jira, you'll need to include a pre-made script (see the task below).

Annotating JUnit Tests

  1. Add the dependency to your .pom file for the Zephyr Scale JUnit library:


  2. Register the Zephyr Scale JUnit listener:
    This will generate the results file with test case keys.

  3. Add annotations to your JUnit tests for the test case key or name:


  4. Run the tests with this command:

    mvn test

    The Zephyr Scale test-execution-result file generates in the same execution folder.

    Finally, if you want to see an example of the Zephyr Scale integration with JUnit in action, we've got you covered.
Highlight search results