cucumber-reporting icon indicating copy to clipboard operation
cucumber-reporting copied to clipboard

Tags overview report shows wrong count for scenarios and feature

Open Sreejishnu777 opened this issue 3 years ago • 6 comments

Issue: Tags overview report shows wrong scenarios and feature count version: 5.6.0 Steps:

  1. Create a feature file with just one scenario
  2. Give a tag for the feature
  3. Give a tag for the scenario as well, make sure it is different from feature tag
  4. Run only this scenario and check overview-tags.html

Actual: Feature tag and scenario tag is in separated rows in the table. Count of scenarios is shown as 2 (Expected: 1) and count of features is shown as 2 (Expected: 1). In this case scenario count should be one and feature count should be one as well. Thus this is contradicting with Feature level report, its showing correct count for feature and scenario.

Please see the screenshots below for both tags and feature reports.

Tags overview: image

As scenarios inherit feature tag, I think both feature tag and scenario tag should be in single row.

Feature-overview: image

Hi @damianszczepanik, If this is an issue or if its by design, I would like to know is there any configuration to hide tags overview report when using in Jenkins? I cant see any such configuration fields in Jenkins for this report. Please advise.

Sreejishnu777 avatar Oct 11 '21 15:10 Sreejishnu777

Attach JSON file

damianszczepanik avatar Oct 11 '21 21:10 damianszczepanik

Here is the JSON:

[ { "line": 2, "elements": [ { "start_timestamp": "2021-10-11T15:19:48.755Z", "line": 5, "name": "Home page default login", "description": "", "id": "application-login;home-page-default-login", "type": "scenario", "keyword": "Scenario", "steps": [ { "result": { "duration": 2000000, "status": "passed" }, "line": 6, "name": "User is on Netbanking landing page", "match": { "location": "stepdefinitions.StepdefinitionDemo.user_is_on_netbanking_landing_page()" }, "keyword": "Given " }, { "result": { "status": "passed" }, "line": 7, "name": "User login to application with username "Sree" and password "12345"", "match": { "arguments": [ { "val": "Sree", "offset": 41 }, { "val": "12345", "offset": 61 } ], "location": "stepdefinitions.StepdefinitionDemo.user_login_to_application_with_username_something_and_password_something(java.lang.String,java.lang.String)" }, "keyword": "When " }, { "result": { "status": "passed" }, "line": 8, "name": "Home page is populated", "match": { "location": "stepdefinitions.StepdefinitionDemo.home_page_is_populated()" }, "keyword": "Then " }, { "result": { "status": "passed" }, "line": 9, "name": "Cards displayed are "true"", "match": { "arguments": [ { "val": "true", "offset": 21 } ], "location": "stepdefinitions.StepdefinitionDemo.cards_displayed_are(java.lang.String)" }, "keyword": "And " } ], "tags": [ { "name": "@featureTag" }, { "name": "@scenarioTag" } ] } ], "name": "Application Login", "description": "", "id": "application-login", "keyword": "Feature", "uri": "file:src/test/java/features/Login.feature", "tags": [ { "name": "@featureTag", "type": "Tag", "location": { "line": 1, "column": 1 } } ] } ]

Sreejishnu777 avatar Oct 12 '21 05:10 Sreejishnu777

This is not valid JSON file: "name": "User login to application with username "Sree" and password "12345"",

damianszczepanik avatar Oct 24 '21 20:10 damianszczepanik

Hi @damianszczepanik

Not sure why you call it as a invalid JSON, I have not manipulated it and it is generated by Cucumber framework. I have mentioned steps above to replicate the issue. Could you please have a look?

Sreejishnu777 avatar Oct 25 '21 15:10 Sreejishnu777

Because it fails syntax validation

damianszczepanik avatar Oct 27 '21 21:10 damianszczepanik

okay, looks like a bug on Cucumber you mean?

Sreejishnu777 avatar Oct 28 '21 07:10 Sreejishnu777