serenity-bdd / serenity-cucumber

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

Cucumber tests scenarios with Example Table #88

Closed anbajaj closed 6 years ago

anbajaj commented 7 years ago

Dear Team,

We are using serenity (1.4.0) with cucumber (1.36.0) & facing an issue when our feature file contains Scenario Outline with Example Table.

The serenity report (index.html) is showing only 1 scenario as failed (100% failed) however there are 8 set of data in Example Table & out of which only 1 row failed.

Also when we click on the scenario name, the detailed view is not showing all the Given, When & Then statements in a tabular format (The way it shows for JBehave). Do we have something similar in Cucumber as well?

image

Would appreciate if you could provide any update on this.

Thanks.

anbajaj commented 7 years ago

Team,

Could you please help with the above query? Right now we are using "CucumberWithSerenity" runner, is there anything else that can be used?

Thanks.

wakaleo commented 7 years ago

Scenario outlines in Cucumber work fine in Serenity; could you post your feature file?

wakaleo commented 7 years ago

In the summary report, a scenario is considered as failing if any of the examples in the example table fail.

anbajaj commented 7 years ago

@wakaleo : Please find the feature file as below:

@eligibility Feature: Eligibility

Scenario Outline: Eligibility for a given buyer & a lot number Given Eligibility buyer status as '<buyerStatus>' And Eligibility buyer number as '<buyerNumber>' And Eligibility lot type as '<lotType>' And Eligibility lot number as '<lotNumber>' When a request is sent to Eligibility service for a buyer and lot number Then Eligibility service response is received And Eligibility buyer details are verified And Eligibility lot details are verified

Examples: | buyerStatus | buyerNumber | lotType | lotNumber | | Active | 1 | NCS | 13972916 | | Active | 100001 | Normal | |

wakaleo commented 7 years ago

That looks fine; there may be a problem with your step definitions.

anbajaj commented 7 years ago

@wakaleo Could you please share a sample serenity-cucumber project with Example Table?

I tried checking step definitions file, it appears correct to me.

wakaleo commented 7 years ago

You can find some examples in this project: https://github.com/serenity-bdd/screenplay-pattern-todomvc

wakaleo commented 6 years ago

Working correctly as intended in the latest version.