Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
None
-
None
-
R3.1.0 S2
-
Description
In order to support the workflow where users prefer to edit and maintain the Cucumber .features and related scenarios in the SCVS (e.g. git, svn), Xray must be able to uniquely identify the scenarios/scenario outlines whenever importing the .feature files
For this, whenever importing Cucumber features, Xray will try to find existing Tests issues using the following rule:
- Test having the labels corresponding to the relative path of the feature file (e.g. "core/sample_addition.feature") and the one corresponding to an unique id in the context of the feature file (e.g. "id:xxx", where xxx is a number).
- Test having the label corresponding to the relative path of the feature file (e.g. "core/sample_addition.feature") and the same summary
Whenever importing Cucumber features, Xray will try to find existing Pre-Conditions issues using the following rule:
- Pre-Condition having the label corresponding to the relative path of the feature file (e.g. "core/sample_addition.feature")
The following rules always take into account the project identified by the "projectKey" prameter".
After this feature is implemented, the rule whenever importing cucumber features will be:
- try to find the Test by key (in that project), if found then update it; else...
- try to find the Test, +in that projec+t, having:
-
- a label with the original relative path of .feature (e.g. "core/sample_addition.feature)
- a label named "id:xxx", where xxx is some number (e.g. "id:1", "id:32"); this label comes from a scenario/scenario outline's tag
- No other label named *.feature
- try to find the Test, in that project, having
- a label with the original relative path of .feature (e.g. "core/sample_addition.feature)
- the same summary
- No other label named *.feature
- try to find the Test, in that project, having:
- The same summary (in that project)
- No label named *.feature, except the one corresponding to the Cucumber file being imported
- create Test in that project and add a label with the relative path of the feature, and another label corresponding to a tag "id:xxx" (if it exists)
- try to find the Pre-Condition by key (in that project), if found then update it; else...
- try to find the Pre-Condition (in that project) having both
- a label with the original relative path of .feature (e.g. "core/sample_addition.feature)
- No other label named *.feature
- try to find the Pre-Condition (in that project) having:
- The same summary (in that project)
- No label named *.feature, except the one corresponding to the Cucumber file being imported
- create Pre-Condition in that project and add a label with the relative path of the feature
Example of sample_additon.feature
@REQ_CALC-1910 Feature: As a user, I can calculate the sum of two numbers Background: Given I have a calculator And I have some fingers @id:1 @fast Scenario Outline: Cucumber Test As a user, I can calculate the sum of two positive numbers Given I have entered <input_1> into the calculator And I have entered <input_2> into the calculator When I press <button> Then the result should be <output> on the screen Examples: | input_1 | input_2 | button | output | | 20 | 30 | add | 50 | | 2 | 5 | add | 7 | | 0 | 40 | add | 40 | | 4 | 50 | add | 54 | | 5 | 50 | add | 55 | @core @id:2 Scenario Outline: Cucumber Test As a user, I can calculate the sum of two negastive numbers Given I have entered <input_1> into the calculator And I have entered <input_2> into the calculator When I press <button> Then the result should be <output> on the screen Examples: | input_1 | input_2 | button | output | | -20 | -30 | add | -50 | | -2 | -5 | add | -7 | | 0 | -40 | add | -40 | | -4 | -50 | add | -54 | | -5 | -50 | add | -55 |
Attachments
Issue Links
- relates to
-
XRAY-1548 As system, whenever importing Cucumber feature files, issue keys should be parsed from the tags
- Closed