Annotations With Other CI Tools/Running Locally

If you are using Cucumber, setup could not be more simple. Add Zephyr Scale annotations to your Cucumber tests, and use our pre-made script to send the results to Jira. The integration is based on the JSON output files generated by Cucumber, so this output option needs to be configured properly, as follows.

Zephyr Scale annotations

Click the image to enlarge it.

  1. Configure the JSON output format for your automated tests on the TestRunner class.

    Here we’ve added JUnit and Cucumber output formats:

  2. Annotate your automated tests with the @TestCaseKey tag.

    The @TestCase(key = "JQA-T1") annotation maps the test method to an existing test case in Zephyr Scale by matching its key. The @TestCase(name = "Sum Two Numbers") annotation adds a name to the test case. This maps this test method to an existing test case in Zephyr Scale by matching its name. If the test case doesn’t exist in Zephyr Scale, then a new one can be automatically created using this name when the results are uploaded.

    Scenarios can be mapped to test cases in Zephyr Scale by using the test-case key or name as a scenario tag.

    For example: @TestCaseKey=ABC-T123.

Cucumber test annotations

JUnit test annotations

Now you can run the tests with Maven test, and the Zephyr Scale test execution results file will generate in the same execution folder.

Scripts for local testing/other CI tools

Add the following scripts to your project if you want to run automated tests locally.

For running automated tests with other CI tools, add this script as a task/script within the tool itself to run after the build.


When using JUnit with the custom output file provided by the Zephyr Scale JUnit Listener:

zip test_result.json
curl --basic --user user:pass -F ""

When using Cucumber:

zip target/cucumber/*
curl --basic --user user:pass -F ""

See Also

Publication date: