Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Gliffy Diagram
namecucumber_tests_legacy_vcs_workflow
pagePin1

Cucumber is a framework for behavior-driven development (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 (e.g., Java, Ruby , C#, or some other language).

Xray provides the tool to create the specification inside Jira, although the implementation code itself is outside of Xray's scope.  

One key thing that you must decide is: where do you want to manage the Cucumber scenarios? Do you want to use Jira as the master of information (recommended)? Or do you want to use Git, for example, as the master for your features and corresponding scenarios?


Info
titlePlease note

Having both Jira and the VCS (e.g. Git, SVN) as master of information for Cucumber Scenarios/Scenario Outlines won't be possible, since it could lead to synchronization issues.

Standard Cucumber workflow

In this workflow, Tests are created and managed in Jira.   ; it will be the master for the Cucumber scenarios.

Gliffy Diagram
namecucumber_tests_workflow
pagePin2

...

Note
titlePlease note

As of Xray v2.3.x, step 2 is not idempotent, i.e., if you try to import Cucumber Tests multiple times using the endpoint Importing Cucumber Tests - REST, you may end up with repeated entities in Jira.

This has been addressed in v3.1.

VCS based workflow


Info
titlePlease note

The support for this workflow has been added in v3.1, in experimental mode.


In this workflow, the features are being "managed" in the source code VCS (versioning control system=). This means that users will be editing features elsewhere, other than Jira, and they will want to synchronize the scenarios contained within those features to Jira. Therefore the master of information will be Git, SVN or whatever VCS is being used.

Gliffy Diagram
namecucumber_tests_legacy_vcs_workflow
pagePin3


  1. Create Cucumber tests (e.g., Scenario/Scenario Outlines) and their respective step code in some other tool.
  2. Import existing Cucumber tests using the REST API (e.g., from an existing code base which may have tests, and their corresponding step implementation) 
  3. Export Cucumber features from Jira to the CI environment, using the REST API or the Jenkins/Bamboo plugins. It is crucial to use these exported features instead of the ones from the VCS, since the features exported from JIRA will contain additional tags that will allow several things, including the ability to correctly report the results to back to the correct entities in Jira, afterwards.
  4. Execute tests in the CI environment.
  5. Report results to Xray, using the REST API or the Jenkins/Bamboo plugins.
  6. Repeat from step 1 onwards.


Common problems

Submission of Cucumber results says "No tests found in execution result"

...