Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not disable webdriver steps reporting when using cucumber step reporter #6049

Merged

Conversation

gambrose
Copy link
Contributor

Proposed changes

Resolves #6048

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

I have marked this as a breaking change as it will affect existing users that have useCucumberStepReporter turned on. If they want to preserve the existing behaviour then would need to also enable disableWebdriverStepsReporting

Reviewers: @webdriverio/project-committers

@jsf-clabot
Copy link

jsf-clabot commented Oct 28, 2020

CLA assistant check
All committers have signed the CLA.

@christian-bromann
Copy link
Member

@gambrose can you please sign the CLA with the email you committed the PR with?

@BorisOsipov I would need your input here if this makes sense 🤔

@@ -193,7 +193,9 @@ class AllureReporter extends WDIOReporter {
return
}

if (this.options.disableWebdriverStepsReporting || this.options.useCucumberStepReporter || this.isMultiremote) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this patch disables whatever useCucumberStepReporter was suppose to be for, doesn't seem to me like a right solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my understanding, useCucumberStepReporter setting is used to change the report hierarchy when using cucumber. It goes this by using steps instead of tests (see line 103).

It appears it also disabled the command logging but as this is controlled using a separate flag and I would like to use both features as per #6049 I think this is the correct approach.

@BorisOsipov
Copy link
Member

@gambrose @christian-bromann
I am useCucumberStepReporter option author. I don't remember why I disable webdriver steps reporting. If it works and report doesn't look like a mess I don't mind

@gambrose
Copy link
Contributor Author

If it works and report doesn't look like a mess I don't mind

The report obviously has more steps with web driver reporting enabled but these extra steps appear as sub-steps to the steps with the gerkin text. So it is still readable and you can then drill down to see what commands where run.

You can also easily get the original behaviour by also enabling disableWebdriverStepsReporting.

@christian-bromann
Copy link
Member

@gambrose can you provide a screenshot how the behavior was before and how it is now?

@gambrose
Copy link
Contributor Author

Original behaviour
original

After change
after

And as I said you regain original behaviour if you also specify disableWebdriverStepsReporting

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! Thanks for looking into this 👍

@christian-bromann christian-bromann added the PR: Bug Fix 🐛 PRs that contain bug fixes label Oct 29, 2020
@christian-bromann christian-bromann merged commit 6351905 into webdriverio:master Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Bug Fix 🐛 PRs that contain bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow webdriver steps reporting in allure when using cucumber step reporting.
4 participants