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

[GPC] Example Sampler #37

Open
judit-nahaj opened this issue Aug 2, 2020 · 1 comment
Open

[GPC] Example Sampler #37

judit-nahaj opened this issue Aug 2, 2020 · 1 comment
Assignees

Comments

@judit-nahaj
Copy link
Contributor

judit-nahaj commented Aug 2, 2020

Summary

The "Random Example" precompiler would take a Scenario Outline containing multiple rows of Examples and change the Scenario Outline, so a given number of examples are executed.

Use cases

It would be a solution for when a tester wants to increase coverage but decrease execution time: they can add all the relevant Examples to the Scenario Outline. This precompiler selects a few Examples to be used in the build. This way, all cases are covered and represented, but not in each build.

Example

Take the following (example) feature file (part):

@examples(1)
Scenario Outline:
  Given the Search page is opened
  And "<searchTerm>" is typed into the Search Field
  And Search is executed
  Then Search Result Count should be "<resultCount>"

  Examples:
    | searchTerm | resultCount |
    | cat        | 5           |
    | dog        | 0           |

Running the precompiler would result in the following feature files:

Scenario Outline:
  Given the Search page is opened
  And "<searchTerm>" is typed into the Search Field
  And Search is executed
  Then Search Result Count should be "<resultCount>"

  Examples:
    | searchTerm | resultCount |
    | cat        | 5           |

Options/Variants

The tag's name is used to mark a scenario with the number of rows selected.

  • Whether any limit is needed for the selected rows (number of rows).
  • Whether there is a default number of rows selected if the value is not set in the tag (1).

Additional context

@szikszail szikszail changed the title Precompiler: Random Example [GPC] Example Sampler Feb 2, 2022
@szikszail
Copy link
Collaborator

@judit-nahaj please review if my update on this issue is correct.
@gherking/gherking, please review this issue and propose any change/improvement.

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

No branches or pull requests

2 participants