You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

 

Cucumber is a framework for BDD, where the test specification is done in natural language, while the implementation of each specification's phrase (i.e. step) is done in code. The step's code may be done in Java, Ruby, C#, or any other language in fact.

Xray provides the tooling for making the specification inside JIRA (the implementation code is out of Xray's scope).  

Standard Cucumber workflow

In this workflow, Tests are created/managed always in JIRA.   

cucumber_tests_workflow

 

  1. Specify Cucumber tests in natural language, in JIRA
  2. Export Cucumber features from JIRA, to the CI environment, using the REST API
  3. Implement tests in code and commit them to the source code versioning sytem
  4. Execute tests in the CI environment
  5. Report results to Xray, using the REST API

Note that Cucumber steps and related code may in fact be implemented before the first step, or may even not be needed to be implemented for a given Test if all the sentences are already implemented as code.

 

Learn more

See Automated Tests (import/export) for more info on how Cucumber feature files are generated and how to import back results to Xray.


Legacy Cucumber workflow

This worfklow can apply to legacy/existing projects, that already have Cucumber tests in some version control system (e.g. GIT, SVN), possibly alongside software's implementation.

 There are also cases where users prefer to edit Cucumber tests in some other tool; even so, they can take advantage of Xray.

Existing Cucumber tests are initialy imported to JIRA, or can even be imported at a regular basis if needed. Editing of Cucumber tests can then proceed only on JIRA side, or can be done simultaneously in JIRA and in some other tool. However, it is recommended to keep the edition of tests only on one side, preferably JIRA. 


cucumber_tests_legacy_workflow


  1. Create Cucumber tests (e.g. Scenario/Scenario Outlines) in some other tool, and the respective step's code
  2. Import existing Cucumber tests using the REST API (e.g. from an existing code base which may have tests and their corresponding step's implementation)
  3. Optionally, and in parallel, 
    1. Specify additional or edit existing Cucumber tests in natural language, in JIRA
    2. Implement remaining tests in code and commit them to the source code versioning sytem
  4. Export Cucumber features from JIRA, to the CI environment, using the REST API
  5. Execute tests in the CI environment
  6. Report results to Xray, using the REST API

 

  • No labels