Don't launch simulator when running unittests

前端 未结 6 1428
悲哀的现实
悲哀的现实 2020-12-07 17:44

Some background:

I have iOS application with a target configured to run unitTests. And I am running build automation tool jenkins on my MacBook whic

6条回答
  •  失恋的感觉
    2020-12-07 18:08

    Using xCode 7 and xCtool.

    xctool is capable of executing unit tests without the simulator.

    To get this working,

    1 . Update target settings to run without a host app.

    Select your project --> then test target --> Set the host application to none.

    2. Install xctool , if you don't have it.

    brew install xctool
    

    3. Run the tests using terminal with xctool.

    xctool -workspace yourWorkspace.xcworkspace -scheme yourScheme run-tests -sdk iphonesimulator
    

提交回复
热议问题