【发布时间】:2013-11-15 15:12:07
【问题描述】:
我在我的 iOS 应用程序中使用 KIF 进行集成/验收测试,我有一个示例需要遍历大约 50 个静态表行,期望视图上的特定内容被推送到堆栈中。
如果我在 Cucumber/Rspec 世界中,我会编写一个类似于 Cucumber 示例的场景大纲:
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 |
场景将为每个示例运行并记录单个通过/失败的位置。有没有简单的方法用 KIF (2.0) 重新创建它?我几乎可以通过循环遍历每个“示例”并在循环的一次执行失败时报告失败来重新创建它,但我担心在实际测试多个示例时只会显示为一次失败。
【问题讨论】:
标签: ios objective-c integration-testing kif-framework kif