Protractor 使用命令行命令在场景大纲中执行单个测试用例
我想使用量角器从场景大纲执行单个测试用例。例如,在下面的场景大纲中,如果我想单独执行测试用例TCID0002,如何使用量角器运行测试用例TCID0002Protractor 使用命令行命令在场景大纲中执行单个测试用例,protractor,bdd,webdriver-io,cucumberjs,Protractor,Bdd,Webdriver Io,Cucumberjs,我想使用量角器从场景大纲执行单个测试用例。例如,在下面的场景大纲中,如果我想单独执行测试用例TCID0002,如何使用量角器运行测试用例TCID0002 @shopping Scenario Outline: Test Given the user navigates to xxx.com When the user searches for <product> Then the current page is shopping cart page E
@shopping
Scenario Outline: Test
Given the user navigates to xxx.com
When the user searches for <product>
Then the current page is shopping cart page
Examples:
|TCID | product|
|TCID0001|soap |
|TCID0002|watch |
|TCID0003|lipstick |
场景大纲中是否有执行单个测试用例的命令?您可以使用示例表上的标记,并将其拆分为两个表。然后在配置文件中提供黄瓜的
@runone
标记到标记选项
@runall
Examples:
|TCID | product|
|TCID0001|soap |
|TCID0002|watch |
|TCID0003|lipstick |
@runone
Examples:
|TCID | product|
|TCID0002|watch |
在我的团队成员的帮助下,找到了在cucumber中执行单个测试用例的解决方案 要运行单个测试用例,请执行以下2个步骤 步骤1 在场景标题中保留TCID,如下所示
Scenario Outline: <TCID> test case to validate search
Given the user navigates to xxx.com
When the user searches for <product>
Then the current page is search result page
Examples:
|TCID | product|
|TCID0001|soap |
|TCID0002|watch |
|TCID0003|lipstick |
-根据您每次的回答,当我想从sceanrio大纲中执行单个测试用例时,我必须构建如上所示的示例。我正在寻找一个命令行命令来执行来自sceanrio大纲的单个测试用例。找到了解决方案!这可能对你有帮助
Scenario Outline: <TCID> test case to validate search
Given the user navigates to xxx.com
When the user searches for <product>
Then the current page is search result page
Examples:
|TCID | product|
|TCID0001|soap |
|TCID0002|watch |
|TCID0003|lipstick |
protractor Config/wagConfig.js --cucumberOpts.name="WAGCAR0002"