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

Report Scenario Outlines as tables #168

Closed
Chirag-SSENSE opened this issue Feb 14, 2018 · 7 comments
Closed

Report Scenario Outlines as tables #168

Chirag-SSENSE opened this issue Feb 14, 2018 · 7 comments
Labels
enhancement @serenity-js/cucumber

Comments

@Chirag-SSENSE
Copy link

@Chirag-SSENSE Chirag-SSENSE commented Feb 14, 2018

I am trying to test few users using the feature file, this is what my feature file looks like:

//example.feature
`Feature: Add item and place the order for that item
In order to wear something new
As an online shopping customer
I want to be able to add an item to my shopping bag and then place the order

Scenario Outline: Add an item to shopping bag to place the order using PaypalPro
	Given "<User>" is logged in to his "<EnvName>" account
	 When he searches item with SKU "<SKUID>" from "<Gender>" section and adds it to his shopping bag
	 Then "<User>" can place the order
Examples:
	| User         | EnvName | SKUID        | Gender |
	| CanadaQCUser | SSENSE  | 51230M000010 | men    |
	| GBUser       | SSENSE  | 51230M000010 | women  |
	| FranceUser   | SSENSE  | 51230M000010 | kids   |
	| USUser       | SSENSE  | 51230M000010 | men    |`

When I run these tests the report only generate results for the last user, as you can see in this case it only generated for the USUser in this case

screen shot 2018-02-14 at 11 15 36 am

@jan-molak
Copy link
Member

@jan-molak jan-molak commented Feb 14, 2018

Hi @Chirag-SSENSE, yes, it is a limitation of the current cucumber-js scenario outline integration, but I'm working to resolve it.
As a workaround you can modify the scenario title to include something that would distinguish one scenario from another, for example (note the (<User>) part):

Scenario Outline: Add an item to shopping bag to place the order using PaypalPro (<User>)
    Given "<User>" is logged in to his "<EnvName>" account
     When he searches item with SKU "<SKUID>" from "<Gender>" section and adds it to his shopping bag
     Then "<User>" can place the order

Examples:
	| User         | EnvName | SKUID        | Gender |
	| CanadaQCUser | SSENSE  | 51230M000010 | men    |
	| GBUser       | SSENSE  | 51230M000010 | women  |
	| FranceUser   | SSENSE  | 51230M000010 | kids   |
	| USUser       | SSENSE  | 51230M000010 | men    |

@jan-molak jan-molak added the @serenity-js/cucumber label Feb 14, 2018
@Chirag-SSENSE
Copy link
Author

@Chirag-SSENSE Chirag-SSENSE commented Feb 15, 2018

@jan-molak , is it possible to get a rough estimation when it can be fixed? The workaround will be messy for us because we have a lot of examples. Just wanted to get an idea

@jan-molak
Copy link
Member

@jan-molak jan-molak commented Mar 4, 2018

Hi @Chirag-SSENSE - I've just started looking into this, so depending on the amount of free time I get it can be anything between a week and a couple of weeks. Sorry, but client work takes a priority.

The simplest workaround you could use in the meantime is to add an id column to each example and then use that to distinguish between them:

Scenario Outline: Add an item to shopping bag to place the order using PaypalPro (<User>)
    Given "<User>" is logged in to his "<EnvName>" account
     When he searches item with SKU "<SKUID>" from "<Gender>" section and adds it to his shopping bag
     Then "<User>" can place the order

Examples:
	| Id | User         | EnvName | SKUID        | Gender |
	| 1  | CanadaQCUser | SSENSE  | 51230M000010 | men    |
	| 2  | GBUser       | SSENSE  | 51230M000010 | women  |
	| 3  | FranceUser   | SSENSE  | 51230M000010 | kids   |
	| 4  | USUser       | SSENSE  | 51230M000010 | men    |

Could that help for now?

@jan-molak jan-molak changed the title The report always generates results for the last user Report Scenario Outlines as tables Mar 4, 2018
harry-kalligeros pushed a commit to harry-kalligeros/serenityjs-demo that referenced this issue Mar 11, 2018
@jan-molak jan-molak mentioned this issue May 28, 2018
5 tasks
jan-molak added a commit that referenced this issue Jul 26, 2018
affects: @serenity-js/core, @serenity-js/cucumber, @integration/cucumber, @integration/testing-tools

The new version will make it possible to support scenario outlines (#168, #220) and provide
additional context in the report
@jan-molak jan-molak added enhancement and removed ready labels Jul 29, 2018
jan-molak added a commit that referenced this issue Jul 29, 2018
affects: @serenity-js/core, @serenity-js/cucumber, @integration/cucumber, @integration/testing-tools

The new version will make it possible to support scenario outlines (#168, #220) and provide
additional context in the report
@AbhineetSharmax
Copy link

@AbhineetSharmax AbhineetSharmax commented Nov 23, 2018

Hi @jan-molak,

Greetings!!

Have faced the similar thing with scenario outline examples, do we have a workaround for it? please suggest.

Thanks :)

@icloudphil
Copy link

@icloudphil icloudphil commented Jan 18, 2019

I am researching solution on this on cucumberJS json formatter, I found it maybe useful convert
https://github.com/rapid7/cucumber-json_expanded/blob/master/lib/cucumber/json_expanded/formatter.rb
to JS version.

@jan-molak
Copy link
Member

@jan-molak jan-molak commented Jan 28, 2019

This will be solved properly in Serenity/JS 2.0, so we'll be able to report on scenarios such as those here :-) Please stay tuned!

@AbhineetSharmax
Copy link

@AbhineetSharmax AbhineetSharmax commented Jan 30, 2019

Kudos!! 🍀

nbarrett pushed a commit to nbarrett/serenity-js that referenced this issue May 1, 2020
…d_yarn/serenity-js/console-reporter-2.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement @serenity-js/cucumber
Projects
None yet
Development

No branches or pull requests

4 participants