Skip to content

Commit

Permalink
Feat/#24 support cucumber scenario outline (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorBodnar authored Sep 2, 2021
1 parent 0869763 commit 617606b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ module.exports = (config) => {
}

event.dispatcher.on(event.test.started, async (test) => {
if (test.body) {
if (test.body.includes('addExampleInTable')) {
const testRailTag = /"testRailTag":"(@C\d+)"/.exec(test.title);
if (testRailTag) {
test.tags.push(testRailTag[1]);
}
}
}
test.startTime = Date.now();
});

Expand Down
13 changes: 13 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ A Gherkin example:
Then I see search textbox
And I see search button
```
**Note:**
TestRail tag in **Examples** from **Scenario Outline** available from version `1.7.4` and above
```gherkin
@someTag
Scenario Outline: Fill some field
When I fill some field by text <text>
Then I see text <text>
Examples:
| testRailTag | text |
| @C1234 | someText1 |
| @C1235 | someText2 |
```

##### Configuration

Expand Down

0 comments on commit 617606b

Please sign in to comment.