如何订购kif测试用例序列?

编程入门 行业动态 更新时间:2024-10-26 12:23:38
本文介绍了如何订购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测试用例序列?

本文发布于:2023-11-29 00:12:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1644518.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:序列   测试   kif

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!