In this tutorial, we will create some tests in Cucumber for Ruby (or JRuby).
The test (specification) is initially created in Jira as a Cucumber Test and afterwards, it is exported using the UI or the REST API.
- Install Ruby or JRuby
- Install the "cucumber" gem
After creating a Cucumber Test, of Cucumber Type "Scenario Outline", in Jira, you can export the specification of the test to a Cucumber .feature file via the REST API or the Export to Cucumber UI action from within the Test Execution issue.
The created file will be similar to the following:
After running the tests and generating the Cucumber JSON report (e.g., data.json), it can be imported to Xray via the REST API or the Import Execution Results action within the Test Execution.
The execution screen details will not only provide information on the test run result, but also of each of the examples provided in the Scenario Outline.
The Cucumber Scenarios Example/Result details (i.e., Hooks, Backgrounds and Steps) are only available for executions done in Xray v2.2.0 and above.
The iconrepresents the evidences ("embeddings") for each Hook, Background and Steps, but is only available for executions done in Xray v2.3.0 and above.
Please see Testing in BDD with Gherkin based frameworks (e.g. Cucumber) for an overview on how to use Cucumber Tests with Xray.
- Automated Tests (Import/Export)
- Exporting Cucumber Tests - REST