Page History
...
Notice that we have added an After scenario that will be executed after each scenario. After validating that an error occurred it will take a screenshot and attach it to the report using the wdio-cucumberjs-json-reporter
library.
You can then 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/Test Execution issue or even based on an existing saved filter. A plugin for your CI tool of choice can be used to ease this task.
...
After being exported, the created .feature(s) will contain references to the Test issue key, eventually prefixed (e.g. "TEST_") depending on an Xray global setting, and the covered "requirement" issue key, if that's the case. The naming of these files is detailed in Export Cucumber Features backup.
Code Block | ||||
---|---|---|---|---|
| ||||
@REQ_XT-225 Feature: Login feature @TEST_XT-226 Scenario: Test Login feature Scenario Outline: As a user, I can log into the secure area Given I am on the login page When I login with <username> and <password> Then I should see a flash message saying <message> Examples: | username | password | message | | tomsmith | SuperSecretPassword! | You logged into a secure area! | | foobar | barfoo | Your username is invalid. | |
...
This will produce one results file that will hold the test results.
The CucumberJson reporter does not produce reports containing the screenshots embedded.
However, we have added an After scenario to do so, but you can use the HTML or Cucumber reporter that allows you to add those as you can find more info here.
After running the tests, results can be imported to Xray via the REST API, or the Import Execution Results action within the Test Execution, or by using one of the available CI/CD plugins (e.g. see an example of Integration with Jenkins).
...
After being exported, the created .feature(s) will contain references to the Test issue keys, eventually prefixed (e.g. "TEST_") depending on an Xray global setting, and the covered "requirement" issue key, if that's the case. The naming of these files is detailed in Export Cucumber Features backup.
Code Block | ||
---|---|---|
| ||
@REQ_XT-225 Feature: Login feature @TEST_XT-226 Scenario Outline: As a user, I can log into the secure area Given I am on the login page When I login with <username> and <password> Then I should see a flash message saying <message> Examples: | username | password | message | | tomsmith | SuperSecretPassword! | You logged into a secure area! | | foobar | barfoo | Your username is invalid. | |
...