我知道场景和场景大纲与here之间的区别。“情景”在黄瓜“场景大纲”中的优势是什么?
Scenario states
一般测试点以更抽象的方式。同时, scenario outline
便于用几个例子来执行场景。
所以,我们通常会写下如下的feature file
。它从scenario
开始,然后通过scenario outline
完成。
特点:您的功能 的标题我想用这个模板我的特征文件
Scenario: Eating
Given I have "N" cucumbers
When I eat "K" ones of them
Then I will have "N-K" ones
Scenario Outline: eating
Given there are <start> cucumbers
When I eat <eat> cucumbers
Then I should have <left> cucumbers
Examples:
| start | eat | left |
| 12 | 5 | 7 |
| 20 | 5 | 15 |
但是,并不意味着多大意义了我。我相信情景大纲更容易理解,因此不需要表达场景测试的一般观点。
你同意我吗?
我的意思是,这个场景做什么,哪个场景大纲不能做?
我建议去用简单的一个
Scenario Outline: eating
Given there are <start> cucumbers
When I eat <eat> cucumbers
Then I should have <left> cucumbers
Examples:
| start | eat | left |
| 12 | 5 | 7 |
| 20 | 5 | 15 |
我知道它会导致一个错误,但我认为它会更好,如果黄瓜队完全删除场景的概念,而是支持方案大纲更多。