How do I automatically perform unit tests on each build?

前端 未结 4 1492
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-07 20:54

How do I automatically perform unit tests on each build?

I tried to add the Unit Tests target to the Project Target as a dependency, but that doesn\'t seem to run th

4条回答
  •  感动是毒
    2021-01-07 21:15

    To establish the relationship between your targets:

    • In the Scheme picker, select "Edit Scheme…"
    • Select the Test phase
    • Make sure you're seeing the Info tab, not the Arguments tab
    • Click '+' and specify your testing target
    • You should see a list of tests. Click 'OK'

    Then to run the tests, choose Product > Test, or simply ⌘U from the keyboard. This will:

    • Build your main target
    • Build your test target
    • Execute your main target according to its type, running the tests

提交回复
热议问题