Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Do
-
None
-
None
-
None
-
None
Description
Whenever running the cucumber rerun formatter for running just some of the examples of a scenario outline, whenever those result is imported to Xray it is not imported to the correct example.. it is imported to the first example(s).
$ cucumber $(cat rerun.txt) @CALC-1285 @REQ_CALC-1067 Feature: As a user, I can calculate the sum of 2 numbers @TEST_CALC-1071 @TESTSET_CALC-1070 Scenario Outline: Cucumber Test # features/1_CALC-1067.feature:7 Given I have entered <input_1> into the calculator # features/1_CALC-1067.feature:8 And I have entered <input_2> into the calculator # features/1_CALC-1067.feature:9 When I press <button> # features/1_CALC-1067.feature:10 Then the result should be <output> on the screen # features/1_CALC-1067.feature:11 Examples: | input_1 | input_2 | button | output | | 1 | 40 | add | 40 | expected: 40.0 got: 41 (compared using ==) (RSpec::Expectations::ExpectationNotMetError) ./features/step_definitions/calculator_steps.rb:24:in `/the result should be (.*) on the screen/' features/1_CALC-1067.feature:17:in `Then the result should be 40 on the screen' features/1_CALC-1067.feature:11:in `Then the result should be <output> on the screen' Failing Scenarios: cucumber features/1_CALC-1067.feature:17 # Scenario Outline: Cucumber Test, Examples (#3) 1 scenario (1 failed) 4 steps (1 failed, 3 passed) 0m0.022s [sergio@localhost cucumber_xray_calc_demo]$

How to replicate:
# use a scenario outline with one failed example in the middle of the examples (eg. sum feature) # run all examples and store the failed ones in a temp file cucumber --format rerun -o rerun.txt -f json -o data.json # run just the failed examples cucumber $(cat rerun.txt) -f json -o data.json # import the results