How do I automatically perform unit tests on each build?

前端 未结 4 1461
佛祖请我去吃肉
佛祖请我去吃肉 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:10

    Here's what I had to do to get XCode 4 to automatically run unit tests on build.

    1. Enable "Test After Build" for your main target. (See Mark Szymczyk's answer)
    2. Enable your Test target to run during the build phase of your main target's build scheme.
      • Click Product > Manage Schemes menu item
      • Double click your target's scheme (I only had one in my list)
      • Unfold the Build accordion on the left
      • Click the Build option in the accordion
      • You should see you test project on the right, make sure the Run checkbox is clicked.

提交回复
热议问题