codeceptjs / codeceptjs/CodeceptJS

Resolve cucumber's scenario outline template parameters

Offen
#2,778 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
4.2k
Forks
757
Ø Merge
2 T. 9 Std.
Gemergte PRs (30 T.)
16

Beschreibung

#### What are you trying to achieve?
When using cucumber's scenario outlines, it's much easier to review your tests results when they don't all have the same name.
So cucumber supports converting the following

```
Scenario Outline: eating
Given there are cucumbers
When I eat cucumbers
Then I should have cucumbers

Examples:
| start | eat | left |
| 12 | 5 | 7 |
| 20 | 5 | 15 |
```
to instead look like
```
Scenario Outline: Having cucumbers, and eating leaves
Given there are cucumbers
When I eat cucumbers
Then I should have cucumbers

Examples:
| start | eat | left |
| 12 | 5 | 7 |
| 20 | 5 | 15 |
```
It was done here https://github.com/cucumber/cucumber-js/issues/267
The 2nd version of this test would produce scenarios with the following names:
- Having 12 cucumbers, and eating 5 leaves 7
- Having 20 cucumbers, and eating 5 leaves 15

#### What do you get instead?
Instead, it appears the template parameters are not resolved when printing the scenario name when the feature is run

> Provide console output if related. Use `--verbose` mode for more details.
In my case my scenario name is `User should have correct credentails.`
and I get
` User should have correct credentails. {"userType":"\"issuer_rep\"","id":"10","homePage":"\"landing/info\""}`

### Details
* CodeceptJS version: CodeceptJS v3.0.4
* NodeJS Version: v14.2.0
* Operating System: Windows/Mac/Ubuntu
* webdriverio

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.