Ordering unit test using XCTest in Xcode 6

后端 未结 7 1362
眼角桃花
眼角桃花 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:29

    The OP did not mention whether CI is available or whether a command line answer would be sufficient. In those cases, I have enjoyed using xctool [1]. It has syntax to run tests down to just a single test method:

    path/to/xctool.sh \
      -workspace YourWorkspace.xcworkspace \
      -scheme YourScheme \
      test -only SomeTestTarget:SomeTestClass/testSomeMethod
    

    I will do this to ensure we test the items we think are easiest first.

    1.[] facebook/xctool: A replacement for Apple's xcodebuild that makes it easier to build and test iOS or OSX apps. ; ; https://github.com/facebook/xctool

    0 讨论(0)
提交回复
热议问题