Cucumber reads executable specifications written in plain text and validates that the software does what those specifications say. The specifications consists of multiple examples, or scenarios. For more info on Cucumber, see here.
The Zephyr Scale/Cucumber Workflow
If you’re using Cucumber, Zephyr Scale allows you to tightly integrate with your automated tests. You can write BDD test cases (gherkin scripts) in Zephyr Scale and use a simple script to export these tests when running a build before sending the results back to Zephyr Scale.
The below diagram shows how this works.
Using with CI server (e.g. Jenkins)
Properly annotating Cucumber tests enables results from Cucumber to be sent directly to the correspongin test cases in Zephyr Scale.
Writing Cucumber tests
Cucumber tests are written in Gherkin - a set of grammar rules that makes plain text structured enough for Cucumber to understand.
Gherkin documents are stored in Gherkin reference for more details.text files and are typically versioned in source control alongside the software. See the
Once you have written your scenarios, you can simply annotate them by adding a tag such as. In this example, Zephyr scale will then map the results of this Cucumber scenario to the corresponding test case with the key .
Feature: Calculator @TestCaseKey=ABC-T123 Scenario: Add a number Given a calculator I just turned on And I add 4 and 4 Then the result is 8
If the test Case doesn't exist yet, there is no need for annotation
## Add a header here for executing your test
Firstly, the JSON output format for Cucumber needs to be configured on the TestRunner class:
On the example above, both JUnit XML and JSON output are enabled.
Uploading results to Zephyr Scale
Now, you can run your tests withand the Cucumber execution results will be generated in .
Mapping a status to Zephyr Scale
We now support all Cucumber statuses. They will map automatically to an existing status or show as Blocked if a matching custom status doesn't exist.
Is something missing? If you’d like to suggest an improvement to this integration, take a look at our Ideas Portal.
You can search for existing ideas or create your own. We review ideas regularly and will take them into account for future development.