【发布时间】:2016-11-21 11:55:28
【问题描述】:
给定一个测试向 3rd-party API 发送消息的场景,我可以对功能中的每个场景重复某些给定,以及具有相关结果的给定。这使得每个场景都非常复杂。
如果我不这样做,那么基本上就有隐藏的假设。我的问题是,在实践中,这些隐藏的假设是否会导致问题,以及即使没有明确说明,利益相关者是否普遍理解这些假设。
非常欢迎任何降低风险的策略。我认为以涵盖“一般”给定和“一般”给定+结果的一个或多个场景作为引导,应该澄清一下,对于随后的场景,您可以忽略这些要求并认为它们已涵盖。我怀疑这仍然是一个假设。
具有 2 个“一般”给定和 2 个具有相关结果的“一般”给定的示例场景:
Scenario 1: An eligible order
Given an order that has been placed yesterday
And that has a value > 100
And that has an order ID equal to 42
And that has an affiliate reference equal to foo
When the conversion for the order is sent
Then the conversion has an ID equal to 42
And the conversion has an affiliate ID equal to foo
【问题讨论】: