我如何在每个“构建并运行"引擎上自动执行单元测试.XCode 5中的操作? [英] How do I automatically perform unit tests on each "build and run" action in XCode 5?

查看:57
本文介绍了我如何在每个“构建并运行"引擎上自动执行单元测试.XCode 5中的操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道之前曾问过类似的问题,但是提供的答案并不涵盖XCode 5.我了解Xcode 5中的TEST_AFTER_BUILD设置已过时(请参阅单元测试-XCode之后出现RunUnitTests错误5次更新)这自然会引出我的问题:既然设置已过时,我如何在每次构建后自动执行单元测试.

I understand that a similar question was asked before, however the provided answer does not cover XCode 5. I understand that the TEST_AFTER_BUILD setting is obsolete in XCode 5 (see unit testing - RunUnitTests error after XCode 5 update) This naturally leads to my question: how exactly do I automate unit testing after each build, now that the setting is obsolete.

非常具体:

  • 我的工作区中有几个(超过10个)项目.
  • 当我按Xcode 5(在UI左上角)中的RUN按钮时,我希望单元测试针对当前方案中的所有依赖项运行(当然,假设相关项目已被修改).
  • 此外,如果任何测试失败,则构建和运行操作应失败.

这在XCode 4中有效;请参阅上面的链接,以了解旧方法"现在已被打破.

This was working in XCode 4; see link above to understand how the 'old way to do it' is now broken.

这是一个迁移问题.我不需要有关XCode中的单元测试的通用(可能已过期)的教程.

This is a MIGRATION issue. I do not need a general (and possibly out of date) tutorial on unit testing in XCode.

推荐答案

我可能为您提供了一个有用的链接:
http://meandmark.com/blog/2013/09/xcode-5-unit-testing-changes/
特别是部分: XCTest

I maybe have a useful link for you:
http://meandmark.com/blog/2013/09/xcode-5-unit-testing-changes/
specially the part: XCTest

这在XCode 4中有效;请参阅上面的链接,以了解旧方法"现在已被打破.

This was working in XCode 4; see link above to understand how the 'old way to do it' is now broken.

您指出了Xcode 5的可能解决方案,即使我不知道它是否是正确的答案.也许您应该更进一步指出您的问题...



您是否正在使用项目的测试方案?您是否尝试过配置正确的预操作并检查了测试设置?

You point to a possible solution for Xcode 5, even if I don't know if its a proper answer. Maybe you should point out your problem a little closer...



And your working with the test scheme of your project? Have you tried to configure the right Pre-action and checked your test settings?

这篇关于我如何在每个“构建并运行"引擎上自动执行单元测试.XCode 5中的操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆