serenity-bdd / serenity-cucumber

Cucumber integration for the Serenity BDD Reporting library
Other
78 stars 74 forks source link

Serenity report does not display examples` values in Scenario outlines titles #138

Closed jakimcho closed 5 years ago

jakimcho commented 6 years ago

Hello, Moved issue 1188 here.

I have a cucumber feature file with a scenario outline that has examples placeholders in its title:

@sanity-check
  Scenario Outline: Player tries to complete Personal details form with <validation_type> in the <field>
    When the player completes Personal details form on Buy Credits page:
      | title   | first_name   | last_name   | date_of_birth   |
      | <title> | <first_name> | <last_name> | <date_of_birth> |
    Then validation "<validation_massage>" for "<field>" should appear on Personal details form

    Examples:
      | validation_type    | field         | title | first_name        | last_name                 | date_of_birth | validation_massage                      |
      | blank field        | title         |       | Automation        | Automation                | 02-27-1995    | This field is required                  |
      | numeric characters | first name    | Mr    | Automation1       | Automation                | 02-27-1995    | Please enter only alphabetic characters |
      .............................
      .............................
      .............................

My expectation is to have more descriptive scenarios titles for each scenario outline run in the report. Something like the one I get in cucumber report:

cucumber_html The examples placeholders in scenario titles are populated with the values from the examples table

But in the actual serenity report I'm getting: serenity_report The examples placeholders in scenario titles are not populated with the values from the examples table

I'm using serenity-core, serenity-cucumber and serenity-maven-plugin versions - 1.9.4

wakaleo commented 6 years ago

Feel free to make a PR, but I don't think this is an easy thing to do.

wakaleo commented 5 years ago

This should work now.

krishnapemmaraju commented 3 years ago

This is still not working , could you please suggest which version of serenity need to be used

wakaleo commented 3 years ago

2.3.12

krishnapemmaraju commented 3 years ago

Still facing issue , I have update pom xml with this verison

wakaleo commented 3 years ago

Can you put a screenshot of what you see and a copy of your feature file?

krishnapemmaraju commented 3 years ago

Thanks for the Reply

image

krishnapemmaraju commented 3 years ago

Feature File

Feature: Sample Test Feautre for Report

Scenario Outline: Title of your scenario outline is Given I want to write a step with When I check for the in step Then I verify the in step

Examples: 
  | name  | value | status  |
  | name1 |     5 | success |
  | name2 |     7 | Fail    |
wakaleo commented 3 years ago

What behaviour are you expecting?

krishnapemmaraju commented 3 years ago

image

krishnapemmaraju commented 3 years ago

I am expecting Title of your scenario outline is name1

wakaleo commented 3 years ago

The title reflects what you write in the feature file. This looks like normal behaviour.

krishnapemmaraju commented 3 years ago

But the name is not getting replaced with the parameter value

wakaleo commented 3 years ago

It's the title of the scenario outline. If you put a variable placeholder, that's what will appear. You have 2 examples, how would Serenity know which one it should use for the title?

krishnapemmaraju commented 3 years ago

ok , if I am having only one example for each scenario like

image

wakaleo commented 3 years ago

That's just not the way the Serenity reporting works, under no circumstances will there be any variable substitution in a scenario outline heading.

krishnapemmaraju commented 3 years ago

thank you... what about the steps in Given and When image

wakaleo commented 3 years ago

It's the same principle - in a scenario outline, it makes no sense to insert any particular value into the text.

krishnapemmaraju commented 3 years ago

I gone through some PR with the same issue and I saw it some fix has been provided for this issue

Cannot make Serenity report display examples values in Scenario outlines titles serenity-bdd/serenity-core#1188

wakaleo commented 3 years ago

It's not an issue, this is the correct, expected, and normal behaviour. That defect is referring to something else (the tags were not being rendered)

krishnapemmaraju commented 3 years ago

Thank you for your Quick Response..