简体   繁体   English

iOS –每次我在模拟器中运行应用程序时如何运行OCUnit测试

[英]iOS – How to run OCUnit tests every time I run my application in simulator

How do I configure so that OCUnit tests are running every time I choose to run my application on the simulator in Xcode? 如何配置,以便每次选择在Xcode中的模拟器上运行应用程序时都能运行OCUnit测试? (Xcode 4.5.1) (Xcode 4.5.1)

My app runs the test fine if I go through Cmd + U ` but not when I choose to run my application. 我的应用程序,如果我去通过Cmd的 + U`但不是当我选择运行我的应用程序运行测试的罚款。 I then get this warning: 然后,我得到以下警告:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Tools/Tools/RunPlatformUnitTests:81: warning: Skipping tests; /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Tools/Tools/RunPlatformUnitTests:81:警告:正在跳过测试; the iPhoneSimulator platform does not currently support application-hosted tests (TEST_HOST set). iPhoneSimulator平台当前不支持应用程序托管的测试(已设置TEST_HOST)。

Check out this answer ; 查看这个答案 ; it describes how to configure Xcode to build you test target during every run of your app in the simulator. 它描述了如何配置Xcode以在模拟器中每次运行应用程序时构建测试目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM