https://github.com/gherking/gpc-scenario-numbering
The ScenarioNumbering precompiler is responsible for adding an index to all scenarios and scenario outlines.
https://github.com/gherking/gpc-scenario-numbering
cucumber feature-file gherkin gherking gpc hacktoberfest precompiler typescript
Last synced: 5 months ago
JSON representation
The ScenarioNumbering precompiler is responsible for adding an index to all scenarios and scenario outlines.
- Host: GitHub
- URL: https://github.com/gherking/gpc-scenario-numbering
- Owner: gherking
- License: mit
- Created: 2019-11-03T20:42:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-11-22T04:32:58.000Z (7 months ago)
- Last Synced: 2025-11-22T06:17:42.137Z (7 months ago)
- Topics: cucumber, feature-file, gherkin, gherking, gpc, hacktoberfest, precompiler, typescript
- Language: Gherkin
- Homepage: https://gherking.github.io/gpc-scenario-numbering/
- Size: 223 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gpc-scenario-numbering
    
The ScenarioNumbering precompiler is responsible for adding an index to all scenarios and scenario outlines.
## Example
```gherkin
@tag1
Scenario Outline: Test language ()
Given I am on Home page user
When language is choosen
Then I should be on Home page
And the title should be ""
@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:
```gherkin
@tag1
Scenario Outline: 1. Test language ()
Given I am on Home page user
When language is choosen
Then I should be on Home page
And the title should be ""
@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:
| Option | Type | Description | Default |
|:------:|:----:|:------------|:--------|
| `format` | `String` | The format, how index should be added to the name of the scenario/scenairo outline. Possible tokens:
- `${name}` the original name
- `${i}` the index
## Other
This package uses [debug](https://www.npmjs.com/package/debug) for logging, use `gpc:scenario-numbering` :
```shell
DEBUG=gpc:scenario-numbering* gherking ...
```
For detailed documentation see the [TypeDocs documentation](https://gherking.github.io/gpc-scenario-numbering/).