webdriverio-boneyard / wdio-cucumber-framework

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

Why does handleBeforeScenarioEvent emit a 'suite:start' event? #69

Closed jaysirju closed 6 years ago

jaysirju commented 7 years ago

I'm prototyping a solution at the moment using Cucumber as the runner and Allure with the reporter. I noticed that in the Allure Report, each step was recorded as a separate test case.

I took a look here, and was expecting handleBeforeScenarioEvent to emit a 'test:start' instead of a 'suite:start' event and for handleBeforeStep to emit 'runner:command' instead of a 'test:start, etc.. Is there a reason why this is not the case?

dmaziar commented 7 years ago

+1 to fix that

michaelBurko commented 6 years ago

+1 for the fix @christian-bromann

dannyjhall commented 6 years ago

Each test (step) needs to have the feature and story labels set for it so the allure reporter can group them correctly.

I have added #91 to include the properties in the event emitter and webdriverio/wdio-allure-reporter#87 to add the labels.

michaelBurko commented 6 years ago

@jaysirju, did https://github.com/webdriverio/wdio-cucumber-framework/pull/91 resolve your issue? It did not for me so I'm just curious if it's something on my end..

christian-bromann commented 6 years ago

This is the correct behavior. A scenario in BDD is like a suite in TDD. If this is causing issues with the Allure reporter we should look into that.