1.0.1 • Published 2 years ago

gpc-scenario-numbering v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

gpc-scenario-numbering

Downloads Version@npm Version@git CI Docs

The ScenarioNumbering precompiler is responsible for adding an index to all scenarios and scenario outlines.

Example

  @tag1
  Scenario Outline: Test language (<language>)
    Given I am on Home page <language> user
    When <language> language is choosen
    Then I should be on Home page
    And the title should be "<title>"

  @tag2
  Examples:
    | language | title     |
    | EN       | Welcome   |
    | FR       | Bienvenue |

  Scenario: Test without tag
    Given I am on Home page user
    Then I should be on Home page

It will be modified to:

  @tag1
  Scenario Outline: 1. Test language (<language>)
    Given I am on Home page <language> user
    When <language> language is choosen
    Then I should be on Home page
    And the title should be "<title>"

  @tag2
  Examples:
    | language | title     |
    | EN       | Welcome   |
    | FR       | Bienvenue |

  Scenario: 2. Test without tag
  Given I am on Home page user
  Then I should be on Home page

Configuration

ScenarioNumbering accepts the following configuration:

OptionTypeDescriptionDefault
formatStringThe format, how index should be added to the name of the scenario/scenairo outline. Possible tokens: ${name} the original name${i} the index${i}. ${name}

Other

This package uses debug for logging, use gpc:scenario-numbering :

DEBUG=gpc:scenario-numbering* gherking ...

For detailed documentation see the TypeDocs documentation.