Resolve cucumber's scenario outline template parameters

オープン
#2,778 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, node.js
領域
testing

調査の方向性

issue ではソースファイルもテストも指定されていません。まず scenario-outline の名前のレンダリングと、テンプレートパラメーターの既存の処理を見つけ、ここに示されている期待される名前と比較してください。生成されたシナリオ名が各 outline パラメーターを対応する Examples の値に置き換え、複数の例の行をカバーできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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 <start> cucumbers
  When I eat <eat> cucumbers
  Then I should have <left> cucumbers

  Examples:
    | start | eat | left |
    |    12 |   5 |    7 |
    |    20 |   5 |   15 |

to instead look like

Scenario Outline: Having <start> cucumbers, and eating <eat> leaves <left>
  Given there are <start> cucumbers
  When I eat <eat> cucumbers
  Then I should have <left> 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 <userType> <id> should have correct credentails.
and I get
User <userType> <id> 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
主要言語
JavaScript
スター
4.2k
フォーク
756
平均マージ
2日 9時間
マージ済み PR(30日)
16

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codeceptjs/CodeceptJS のほかの issue

codeceptjs/CodeceptJS の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。