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

HTML Report includes all features, not listening to tag filtering. #1444

Closed
dnldpavlik opened this issue Jul 9, 2020 · 9 comments
Closed
Labels
⌛ stale Will soon be closed by stalebot unless there is activity

Comments

@dnldpavlik
Copy link

Describe the bug
When using the HTML Formatter for --format, I get an HTML document that contains all features, even ones that were not executed during the test run. Each feature is in a collapsable container, also there is no header with the run stats.

To Reproduce
Steps to reproduce the behavior:

  1. execute cucumber -f HTML --out report.html -t 'not @exclude'
  2. Open the report and see @exclude features are listed in the report.

Expected behavior
HTML report to be generated with only features that were executed.

Context & Motivation

This is breaking the report runner that I use to aggregate several cucumber test runs into a summary report.

Your Environment

  • Versions 4.1.0
  • Windows Serve 2016 Datacenter
@vincent-psarga
Copy link
Contributor

Hi and thanks for the report,

Both issues should be fixed by cucumber#1111
I thought those issues were solved but the reporter did not use the correct component for rendering.

That said, the not executed feature will still be in the HTMl report, but hidden by default. Would that be enough for you ?

@luke-hill
Copy link
Contributor

@vincent-psarga One question about the above. Would this only be for features that are tagged but excluded? Or would this be for all different "types" of permutations.

i.e. Features in certain directory (Would the other features not ran be in the report hidden)
i.e. Features that match an inclusion tag, such as -t @positive (Would all other features without this tag / no tags, be in the report hidden)

Reason I ask is some companies would have a features directory with say 500 features, but only ever run 20 per execution. So if the report is creating data for 500 features, it would be a lot of excess work?

@vincent-psarga
Copy link
Contributor

vincent-psarga commented Jul 10, 2020

That's a good question :) The features/scenarios will be in the HTML report if they have been parsed by Cucumber.
Basically, it will depend on the way you run the suite. I'll take the example of cucumber-ruby (and considering I added the @excluded tag on features/docs/cli/dry_run.feature).

bundle exec cucumber -> 81 GherkinDocument messages emitted, so all feature would be in the HTML report
bundle exec cucumber -t "not @excluded" -> same messages, so all features in the HTML report
bundle exec cucumber features/docs/cli -> 16 GherkinDocument messages emitted (so the ones that are not even "loaded" (or whatever the correct term is) will be displayed

I don't think it'd be a huge investment to really remove the not executed feature in the HTML report, it's a use case that we did not think of before.

@AlphaInfamous
Copy link

is there a timeline on when this issue can be fixed.

@vincent-psarga
Copy link
Contributor

vincent-psarga commented Jul 21, 2020

is there a timeline on when this issue can be fixed.

the PR (cucumber#1111) about the html-formatter has been merged, so hopefully I'll be able to cut a release for those.

@AlphaInfamous
Copy link

@vincent-psarga Thank you. waiting for the release.

@AlphaInfamous
Copy link

Hi Updated to Cucumber 5.0.0 and now all my html reports are being generated as Blank. (JSON is not empty.)

@stale
Copy link

stale bot commented Dec 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Dec 15, 2020
@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective.

@stale stale bot closed this as completed Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⌛ stale Will soon be closed by stalebot unless there is activity
Projects
None yet
Development

No branches or pull requests

4 participants