如何在 Specflow 中使用示例标签?这在小黄瓜语法中是什么意思。任何示例或博客重定向都会有所帮助,谢谢
问问题
2121 次
1 回答
4
直接从github 示例中怎么样?
基本上,这通常与 a 一起使用Scenario Outline
,这只是一种使用不同输入/输出数据运行相同场景的方式,而无需重新输入整个场景。通常,我将其视为Scenarios
,但似乎Examples
也可以使用。
从例子:
以下两种情况:
Scenario: Title should be matched
When I perform a simple search on 'Domain'
Then the book list should exactly contain book 'Domain Driven Design'
Scenario: Space should be treated as multiple OR search
When I perform a simple search on 'Windows Communication'
Then the book list should exactly contain books 'Inside Windows SharePoint Services', 'Bridging the Communication Gap'
和这个一样 情景大纲
@alternative_syntax
Scenario Outline: Simple search (scenario outline syntax)
When I perform a simple search on '<search phrase>'
Then the book list should exactly contain books <books>
Examples:
|search phrase |books |
|Domain |'Domain Driven Design' |
|Windows Communication |'Inside Windows SharePoint Services', 'Bridging the Communication Gap' |
于 2012-04-19T04:10:36.333 回答