Cucumber 我可以用一个例子来描述多个场景大纲吗
这是我正在使用的代码:Cucumber 我可以用一个例子来描述多个场景大纲吗,cucumber,feature-extraction,python-behave,Cucumber,Feature Extraction,Python Behave,这是我正在使用的代码: Scenario Outline: Fill <answers> for Shares When Select one of "<answers>" from Shares Then One of the Shares dropdown "<answers>" will be visible Scenario Outline: Fill <answers> for Forex When Select one
Scenario Outline: Fill <answers> for Shares
When Select one of "<answers>" from Shares
Then One of the Shares dropdown "<answers>" will be visible
Scenario Outline: Fill <answers> for Forex
When Select one of "<answers>" from Forex
Then One of the Forex dropdown "<answers>" will be visible
Examples:
| answers |
| Frequently |
| Sometimes |
| No |
场景大纲:填充共享
从共享中选择一个“”时
然后,其中一个“共享”下拉列表“”将可见
场景概述:外汇填充
当从外汇中选择“”之一时
然后,其中一个外汇下拉列表“”将可见
示例:
|答复|
|频繁地|
|有时|
|没有|
但我有一个错误,第一个场景大纲没有示例。
要点是:这个例子是重复的,所以我想问的是,我可以用一个例子表来描述多个场景大纲吗?场景大纲必须有例子。 您可以将以下单个场景大纲与所有选项一起使用
Scenario Outline: Fill <answers> for Forex
When Select one of "<answers>" from <type>
Then One of the Forex dropdown "<answers>" will be visible
Examples:
|type | answers |
|forex | Frequently |
|forex | Sometimes |
|forex | No |
|shares | Frequently |
|shares | Sometimes |
|shares | No |
场景大纲:填写外汇
从中选择一个“”时
然后,其中一个外汇下拉列表“”将可见
示例:
|类型|答案|
|外汇|频繁|
|外汇|有时|
|外汇|否|
|经常分享|
|有时分享|
|股份|否|
您可以将股票|外汇
作为示例
部分的值列移动。