Page History
...
The "Feature" section is not imported since the feature itself should exist previously as a Jira requirement issue (e.g., story).
The exception is the tags before the "Feature: " section; if a requirement issue is found for the specified key, then a "Tests" link is created between the Test and the requirement issue.
If the Cucumber feature has a background, a Pre-Condition issue will be created, if the issue key in the tag does not exist in JIRA, or updated, containing the information provided in that background.
If the background has no name, then the Summary of the Pre-Condition is going to be a string containing the keys of the Tests of that Cucumber feature (e.g. "Background for: CALC-1, CALC-2").
Below is an example of a .feature file containing a Scenario Outline and two Pre Conditions:
No Format |
---|
@REQ_CALC-889 Feature: As a user, I can calculate the sum of 2 numbers Background: #@PRECOND_TX-114 Given that the calculator is configurated Then turnturned on the calculator And set the mode is to advanced #@PRECOND_-TX-115155 Given that the calculator is configurated Turn on the basic modehas been reset @UI @core Scenario Outline: Cucumber Test As a user, I can calculate the sum of 2 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 | |
In this other hypotetical example, a feature file is shown containing one Background and two tests: one Scenario Outline and a Scenario. Each Scenario/Scenario Outline is identified by an internal "id:xxx", in order to uniquely identify the scenario within the feature file.
Code Block |
---|
@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 | @id:2 Scenario: Cucumber Test As a user, I can calculate the sum of two negative numbers Given I have entered -1 into the calculator And I have entered -3 into the calculator When I press add Then the result should be -4 on the screen |
Whenever this feature is imported for the first time, assuming it was imported from file named "features/addition.feature" in a zip file,
- a Pre-Condition with the summary "Background for: <issue_key_of_first_test>,<issue_key_of_second_test>" will be created;
- a Cucumber Test of type "Scenario Outline" will be created, having the summary "Cucumber Test As a user, I can calculate the sum of two positive numbers". The Test will have the label "fast";
- a Cucumber Test of type "Scenario" will be created, having the summary "Cucumber Test As a user, I can calculate the sum of two negative numbers";
- All previous Tests will be linked to the requirement CALC-1910
Whenever this same feature is imported for the second and following times, assuming it was imported from file named "features/addition.feature" in a zip file,
- a Pre-Condition with the summary "Background for: <issue_key_of_first_test>,<issue_key_of_second_test>" and the label "features/addition.feature" will be updated;
- a Cucumber Test having the labels "features/addition.feature" and "id:1" will be updated with the specification of the Scenario Outline; The Test will have the label "fast" (added if needed);
- a Cucumber Test having the labels "features/addition.feature" and "id:1" will be updated with the specification of the Scenario;
- All previous Tests will be linked to the requirement CALC-1910
Expand | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||
|