【发布时间】:2019-03-28 00:58:53
【问题描述】:
假设我的 demo.feature 文件中有一个场景
Scenario Outline: Gather and load all submenus
Given I will login using <username> and <password>
When I will click all links
Examples :
| username | password |
| user1 | pass1 |
| use2 | pass2 |
假设我有一个名为 users.json 的文件
如何从该外部文件中获取这些用户名和密码到我的 demo.feature ? 我可以通过将参数传递给我的 npm 脚本来捕获文件,如下所示? npm run cucumber -- --params.environment.file=usernames.json
【问题讨论】:
标签: protractor cucumber gherkin cucumberjs