webdriverio-boneyard / wdio-cucumber-framework

A WebdriverIO v4 plugin. Adapter for Cucumber testing framework.
MIT License
77 stars 61 forks source link

All steps in feature is assign to last scenario #130

Closed NastaNe closed 6 years ago

NastaNe commented 6 years ago

Hello, I recently updated to 2.0.1 version and run into this problem. My steps of features is all assigned to one scenario. And when using for example allure framework I am receiving unknown results for all others scenario.

The example feature file:

Feature: Test'
  Scenario: First
     Given Customer "test4fd3413@test.com"
      When Login to site
      Then Name is right

  Scenario: Second
    Given Customer "test4fd34144323@test.com"
    When Login to CRM Site
    Then Email is right

And result in spec reporter:

Test
 Get the Statuses Of Order
       ✓ Customer "test4fd3413@test.com"
       ✓ Login to site
      ✓ Name is right

         Send Payment Link for Not Paid Order in CRM Front
              ✓ Customer "test4fd34144323@test.com"
              ✓ Login to site
              ✓ Email is right

In allure report:

screen shot 2018-06-05 at 13 34 57

Dependencies: "cucumber": "4.1.0", "webdriverio": "4.9.11" "wdio-allure-reporter": "0.6.1", "wdio-cucumber-framework": "2.0.1"

With "wdio-cucumber-framework": "1.1.1" all is working fine

ezwanharun commented 6 years ago

i was also facing the same issue...with all the latest version

oflorko commented 6 years ago

Hi, I am experiencing the same issue with dependencies: "allure-commandline": "^2.5.0", "cucumber": "^4.2.1", "wdio-allure-reporter": "0.6.2", "wdio-cucumber-framework": "^2.1.0", "webdriverio": "^4.12.0"

Dummy scenario:

Feature: Navigation in app

  Scenario: I can navigate between pages
    Given I have opened the app
    And I am logged in

  Scenario: I can check the app
    Given I have opened the app
    When I have opened the app
    Then I have opened the app
screen shot 2018-07-10 at 16 13 35
woolter commented 6 years ago

The problem here is the order in which the messages are sent.

All steps are assigned to the last, because "event": "suite:start", are send together and after all steps

V1.1.1

{"event":"suite:start","cid":"0-0","uid":"SEARCH TOOLS ONE1","title":"SEARCH TOOLS ONE","pending":false,"parent":null,"type":"suite","file":"/src/features/testSimple/search_ONE.feature","err":{},"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[]}
{"event":"suite:start","cid":"0-0","uid":"GOOGLE3","title":"GOOGLE","pending":false,"parent":"SEARCH TOOLS ONE1","type":"suite","file":"/src/features/testSimple/search_ONE.feature","err":{},"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[]}
{"event":"test:start","cid":"0-0","uid":"I open the url \"https://www.google.com/\"4","title":"I open the url \"https://www.google.com/\"","pending":false,"parent":"GOOGLE3","type":"test","file":"/Users/src/features/testSimple/search_ONE.feature","err":{},"duration":0,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"featureName":"SEARCH TOOLS ONE","scenarioName":"GOOGLE"}
{"event":"test:pass","cid":"0-0","uid":"I open the url \"https://www.google.com/\"4","title":"I open the url \"https://www.google.com/\"","pending":false,"parent":"GOOGLE3","type":"test","file":"/src/features/testSimple/search_ONE.feature","err":{},"duration":458,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[]}
{"event":"test:start","cid":"0-0","uid":"I pause for 3000ms5","title":"I pause for 3000ms","pending":false,"parent":"GOOGLE3","type":"test","file":"/Users/src/features/testSimple/search_ONE.feature","err":{},"duration":0,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"featureName":"SEARCH TOOLS ONE","scenarioName":"GOOGLE"}
{"event":"test:pass","cid":"0-0","uid":"I pause for 3000ms5","title":"I pause for 3000ms","pending":false,"parent":"GOOGLE3","type":"test","file":"/src/features/testSimple/search_ONE.feature","err":{},"duration":3007,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[]}
{"event":"suite:end","cid":"0-0","uid":"GOOGLE3","title":"GOOGLE","pending":false,"parent":"SEARCH TOOLS ONE1","type":"suite","file":"/src/features/testSimple/search_ONE.feature","err":{},"duration":3477,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[]}
{"event":"suite:start","cid":"0-0","uid":"DUCK DUCK GO8","title":"DUCK DUCK GO","pending":false,"parent":"SEARCH TOOLS ONE1","type":"suite","file":"/src/features/testSimple/search_ONE.feature","err":{},"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[]}
{"event":"test:start","cid":"0-0","uid":"I open the url \"https://duckduckgo.com/\"9","title":"I open the url \"https://duckduckgo.com/\"","pending":false,"parent":"DUCK DUCK GO8","type":"test","file":"/Users/src/features/testSimple/search_ONE.feature","err":{},"duration":0,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"featureName":"SEARCH TOOLS ONE","scenarioName":"DUCK DUCK GO"}
{"event":"test:pass","cid":"0-0","uid":"I open the url \"https://duckduckgo.com/\"9","title":"I open the url \"https://duckduckgo.com/\"","pending":false,"parent":"DUCK DUCK GO8","type":"test","file":"/src/features/testSimple/search_ONE.feature","err":{},"duration":334,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[]}
{"event":"test:start","cid":"0-0","uid":"I pause for 3000ms10","title":"I pause for 3000ms","pending":false,"parent":"DUCK DUCK GO8","type":"test","file":"/Users/src/features/testSimple/search_ONE.feature","err":{},"duration":0,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"featureName":"SEARCH TOOLS ONE","scenarioName":"DUCK DUCK GO"}
{"event":"test:pass","cid":"0-0","uid":"I pause for 3000ms10","title":"I pause for 3000ms","pending":false,"parent":"DUCK DUCK GO8","type":"test","file":"/src/features/testSimple/search_ONE.feature","err":{},"duration":3010,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[]}
{"event":"suite:end","cid":"0-0","uid":"DUCK DUCK GO8","title":"DUCK DUCK GO","pending":false,"parent":"SEARCH TOOLS ONE1","type":"suite","file":"/src/features/testSimple/search_ONE.feature","err":{},"duration":3354,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[]}
{"event":"suite:end","cid":"0-0","uid":"SEARCH TOOLS ONE1","title":"SEARCH TOOLS ONE","pending":false,"parent":null,"type":"suite","file":"/src/features/testSimple/search_ONE.feature","err":{},"duration":6885,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[]}

V2.2.2

{"event":"suite:start","cid":"0-0","uid":"SEARCH TOOLS ONE1","title":"SEARCH TOOLS ONE","pending":false,"parent":null,"type":"suite","file":"src/features/testSimple/search_ONE.feature","err":{},"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"keyword":"Feature"}
{"event":"suite:start","cid":"0-0","uid":"GOOGLE3","title":"GOOGLE","pending":false,"parent":"SEARCH TOOLS ONE1","type":"suite","file":"src/features/testSimple/search_ONE.feature","err":{},"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"keyword":null}
{"event":"suite:start","cid":"0-0","uid":"DUCK DUCK GO7","title":"DUCK DUCK GO","pending":false,"parent":"SEARCH TOOLS ONE1","type":"suite","file":"src/features/testSimple/search_ONE.feature","err":{},"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"keyword":null}
{"event":"test:start","cid":"0-0","uid":"I open the url \"https://www.google.com/\"4","title":"I open the url \"https://www.google.com/\"","pending":false,"parent":"GOOGLE3","type":"test","file":"src/features/testSimple/search_ONE.feature","err":{},"duration":0,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"featureName":"SEARCH TOOLS ONE","scenarioName":"GOOGLE","keyword":null}
{"event":"test:pass","cid":"0-0","uid":"I open the url \"https://www.google.com/\"4","title":"I open the url \"https://www.google.com/\"","pending":false,"parent":"GOOGLE3","type":"test","file":"src/features/testSimple/search_ONE.feature","err":{},"duration":338,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"keyword":"Given ","argument":[]}
{"event":"test:start","cid":"0-0","uid":"I pause for 3000ms5","title":"I pause for 3000ms","pending":false,"parent":"GOOGLE3","type":"test","file":"src/features/testSimple/search_ONE.feature","err":{},"duration":0,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"featureName":"SEARCH TOOLS ONE","scenarioName":"GOOGLE","keyword":null}
{"event":"test:pass","cid":"0-0","uid":"I pause for 3000ms5","title":"I pause for 3000ms","pending":false,"parent":"GOOGLE3","type":"test","file":"src/features/testSimple/search_ONE.feature","err":{},"duration":3009,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"keyword":"And ","argument":[]}
{"event":"suite:end","cid":"0-0","uid":"GOOGLE3","title":"GOOGLE","pending":false,"parent":"SEARCH TOOLS ONE1","type":"suite","file":"src/features/testSimple/search_ONE.feature","err":{},"duration":3567,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"keyword":null}
{"event":"test:start","cid":"0-0","uid":"I open the url \"https://duckduckgo.com/\"8","title":"I open the url \"https://duckduckgo.com/\"","pending":false,"parent":"DUCK DUCK GO7","type":"test","file":"src/features/testSimple/search_ONE.feature","err":{},"duration":0,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"featureName":"SEARCH TOOLS ONE","scenarioName":"DUCK DUCK GO","keyword":null}
{"event":"test:pass","cid":"0-0","uid":"I open the url \"https://duckduckgo.com/\"8","title":"I open the url \"https://duckduckgo.com/\"","pending":false,"parent":"DUCK DUCK GO7","type":"test","file":"src/features/testSimple/search_ONE.feature","err":{},"duration":318,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"keyword":"Given ","argument":[]}
{"event":"test:start","cid":"0-0","uid":"I pause for 3000ms9","title":"I pause for 3000ms","pending":false,"parent":"DUCK DUCK GO7","type":"test","file":"src/features/testSimple/search_ONE.feature","err":{},"duration":0,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"featureName":"SEARCH TOOLS ONE","scenarioName":"DUCK DUCK GO","keyword":null}
{"event":"test:pass","cid":"0-0","uid":"I pause for 3000ms9","title":"I pause for 3000ms","pending":false,"parent":"DUCK DUCK GO7","type":"test","file":"src/features/testSimple/search_ONE.feature","err":{},"duration":3010,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"keyword":"And ","argument":[]}
{"event":"suite:end","cid":"0-0","uid":"DUCK DUCK GO7","title":"DUCK DUCK GO","pending":false,"parent":"SEARCH TOOLS ONE1","type":"suite","file":"src/features/testSimple/search_ONE.feature","err":{},"duration":6901,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"keyword":null}
{"event":"suite:end","cid":"0-0","uid":"SEARCH TOOLS ONE1","title":"SEARCH TOOLS ONE","pending":false,"parent":null,"type":"suite","file":"src/features/testSimple/search_ONE.feature","err":{},"duration":6910,"runner":{"0-0":{"browserName":"chrome","name":"SEARCH TOOLS ONE"}},"specs":["/Users/src/features/testSimple/search_ONE.feature"],"tags":[],"keyword":null}
BorisOsipov commented 6 years ago

Duplicate of https://github.com/webdriverio/wdio-cucumber-framework/issues/129