Running individual XCTest (UI, Unit) test cases for iOS apps from the command line

后端 未结 5 1616
后悔当初
后悔当初 2020-12-02 20:44

Is it possible to run individual test cases, or individual test suites, from an iOS app test target, instead of all the test cases, from a command line interface?

Yo

5条回答
  •  遥遥无期
    2020-12-02 21:12

    To run an individual test or test class you can click the diamond next to it in the gutter. This is right next to where line numbers appear if you have them turned on.

    In this screenshot my mouse is hovering over the diamond. Notice how it has changed to a little play arrow indicating it will be run.

    You can then re-execute the most recently run test(s) with ⌃⌥⌘ G.

    As far as I know this cannot be done via the xcodebuild.

提交回复
热议问题