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

Feat/#24 support cucumber scenario outline #37

Merged
merged 3 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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