Ordering unit test using XCTest in Xcode 6

后端 未结 7 1426
眼角桃花
眼角桃花 2020-12-24 12:37

I would like to know if there is any way to tell Xcode to run unit tests in a specified order. I mean not in a same XCTestCase class file, but between all the class file.

7条回答
  •  攒了一身酷
    2020-12-24 13:15

    its ordered by function names letter orders, doesn't matter how you order it in your code. e.g.:

    -(void)testCFun(){};
    -(void)testB2Fun(){};
    -(void)testB1Fun(){};
    

    the actual execute order is :

    1. testB1Fun called
    2. testB2Fun called
    3. testCFun called

提交回复
热议问题