How do I automatically perform unit tests on each build?(如何在每个构建上自动执行单元测试?)
问题描述
如何在每个构建上自动执行单元测试?
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 the actual tests.
推荐答案
将 Test After Build 构建设置设置为 Yes.选择 Product > Build For > Build For Testing 来构建项目并运行测试.
Set the Test After Build build setting to Yes. Choose Product > Build For > Build For Testing to build the project and run the tests.
Xcode 5 更新
Xcode 5 不支持 Test After Build 构建设置.我不知道有什么方法可以在 Xcode 5 中对每个构建自动运行测试.从 OS X 菜单栏中选择 Product > Test 或按 Command + u 在 Xcode 5 中运行单元测试.
Xcode 5 does not support the Test After Build build setting. I don't know of any way to automatically run tests on each build in Xcode 5. From the OS X menu bar choose Product > Test or press Command + u to run unit tests in Xcode 5.
这篇关于如何在每个构建上自动执行单元测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在每个构建上自动执行单元测试?


基础教程推荐
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01