【发布时间】:2017-07-26 04:45:32
【问题描述】:
在我的应用程序中,Estimate 和 Invoice 的测试集非常相似。我可以使用场景大纲和示例来重复使用这些类型的测试。但是如何通过示例重复所有功能中的测试,而不是在每个场景大纲中重复示例?
例如,有没有一种方法可以重写下面的测试而无需两次声明示例?
Scenario Outline: Adding a sales line item
Given I have a <Transaction>
And Add Hours of quantity 2 and rate 3
When I save
Then the total is 6
Examples:
| Transaction |
| Invoice |
| Estimate |
Scenario Outline: Adding two sales line item
Given I have a <Transaction>
And Add Hours of quantity 2 and rate 3
And Add Hours of quantity 5 and rate 2
When I save
Then the total is 16
Examples:
| Transaction |
| Invoice |
| Estimate |
换句话说,是否有这样的东西,因为缺少更好的功能大纲?
【问题讨论】:
标签: specflow