我一直在从不同的资源中读取场景和场景大纲之间的差异,但我能找到的任何地方都是‘场景与单个值一起工作,您可以使用场景大纲为多个示例运行相同的场景。
但实际上,我看不出这种差别。我能够使用场景和场景大纲的互换性,即使我有多个例子,也没有任何问题。
有谁能告诉我,这是什么东西,是允许在任何新版本的斯波弗尔?场景和场景大纲之间有什么实际区别吗?
我使用的Specflow版本是: 3.1.89
发布于 2021-08-15 16:41:11
场景大纲是一个模板。相关场景的步骤是相同的,但对于不同的数据,系统行为可能有所不同。请考虑以下示例:
Scenario Outline:
Given the system is up and running
When the user provides value <TestData>
Then the system should display <ExpectedResult>
Examples:
|TestData| ExpectedResult |
|True | Operation failed |
|False | Operation succeeded|如果没有场景大纲,您必须准备以下场景:
Scenario:
Given the system is up and running
When the user provides value True
Then the system should display Operation failed
Scenario:
Given the system is up and running
When the user provides value False
Then the system should display Operation succeededhttps://stackoverflow.com/questions/68790580
复制相似问题