如何订购kif测试用例序列? [英] how to order kif testcase sequences?

查看:108
本文介绍了如何订购kif测试用例序列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了最新版本的KIF框架,并创建了几个测试用例(KIFTestCase的子类).

I used the latest version of KIF framework and create several testing cases (subclass of KIFTestCase).

我可以知道有什么方法可以更改测试运行顺序吗?

May I know is there any way to change the order of the sequences of testing runs?

例如,我有testA.m testB.m testC.m ... 当我按下cmd + U进行测试时,如何制作诸如testB.m testC.m testA.m之类的序列?

for examples I have testA.m testB.m testC.m ... how to make the sequence such as testB.m testC.m testA.m when I hit a cmd+U for testing?

推荐答案

据我所知,目前在KIF中尚不可能.

This is not possible in KIF currently, as far as I know.

从技术上讲,它是字母数字而不是字母顺序,这指示了一种有用的解决方法.一种变通方法是使用字母前缀来测试名​​称,这些名称通过将计数递增到A,B,C来进行逻辑分组.这消除了字母系统的大多数缺点,因为您可以将需要进行测试的测试组分开在一起,可以重新排序这些测试或在每个系列中添加其他测试,而不必重命名KIF测试类中的每个测试.

Technically it is alphanumeric rather than alphabetical ordering, which points to a useful work-around. A work-around is to use alphabetical prefixes to test names that group them logically, by incrementing a count to the A, B, C. This eliminates most of the disadvantages of the alphabetical system as you can separate out groups of tests that need to be together, and can re-order those tests or add additional tests in each of those series without having to rename every test in your KIF test class.

- (void)testA1_RelatedTest1
- (void)testA2_RelatedTest1
- (void)testA3_RelatedTest3

- (void)testB1_OtherAreaOfTesting1
- (void)testB2_OtherAreaOfTesting2

- (void)testC1_FinalTestCategory1
- (void)testC2_FinalTestCategory2
- (void)testC3_FinalTestCategory3

这篇关于如何订购kif测试用例序列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆