在SpecFlow中,是否可以在多个场景大纲之间共享一组常见示例,而不必为每个大纲复制示例集?
例如,抱歉使用了简单的示例,但在这里,Examples
在每个Scenario Outline
中都被重复使用,我想知道是否可以声明这些Examples
一次,然后在每个Scenario Outline
中使用它们?
Feature: Just an example about animals
Scenario Outline:
Given an <animal>
When something happens
Then this should be the outcome
Examples:
| animal |
| Dog |
| Cat |
Scenario Outline:
Given an <animal>
When something different happens
Then this other thing should be the outcome
Examples:
| animal |
| Dog |
| Cat |