how to order kif testcase sequences?

2019-07-13 02:03发布

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?

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?

2条回答
爷的心禁止访问
2楼-- · 2019-07-13 02:52

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

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
查看更多
看我几分像从前
3楼-- · 2019-07-13 03:00

It's ordered alphabetically, example:

    - (void)testB {} will be the second test

    - (void)testA {} will be the first test

    - (void)testC {} will be the third test
查看更多
登录 后发表回答