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

Tags overview report shows wrong count for scenarios and feature #1025

Open
Sreejishnu777 opened this issue Oct 11, 2021 · 6 comments
Open

Comments

@Sreejishnu777
Copy link

Sreejishnu777 commented Oct 11, 2021

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.

@damianszczepanik
Copy link
Owner

Attach JSON file

@Sreejishnu777
Copy link
Author

Sreejishnu777 commented Oct 12, 2021

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
}
}
]
}
]

@damianszczepanik
Copy link
Owner

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

@Sreejishnu777
Copy link
Author

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?

@damianszczepanik
Copy link
Owner

Because it fails syntax validation

@Sreejishnu777
Copy link
Author

okay, looks like a bug on Cucumber you mean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants