如何在xcode4中实现应用程序测试?
我正在尝试为我的应用程序添加一些测试。根据 Apple 的文档,我向我的项目添加了两个测试包。 逻辑测试没有问题,但是当我尝试在设备上进行应用程序测试时,我总是收到逻辑测试不在设备上运行的错误。
在 Xcode 3 中没有问题。只有 Xcode 4 会抛出此错误...
有什么建议吗?
谢谢,蒂姆
I'm trying to add some Tests for my application. Following the Document from Apple, I add two testing bundles to my project.
The logic tests are no problem, but when I try to make the application tests on a device I always get the error that the logic tests don't run on a device.
In Xcode 3 there is no problem with that. Only Xcode 4 throws this error...
Any suggestions?
Thanks, Tim
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 xcode4 中设置应用程序测试时也遇到问题。
对我有用的解决方案如下:
假设您有一个名为“MyApp”的应用程序目标,
这会导致测试在 MyApp 中运行。
通过这样做,您不必将每个 .m 文件都包含到测试目标中。
要在设备上运行测试,请插入设备并选择方案“MyAppTesting on device”并作为测试运行。确保上述方案已在测试/构建配置中设置“调试”,这应该是默认值。
此致。
i was also having problems with setting up application tests in xcode4.
A solution that worked for me was as follows:
Assuming you have an application target called "MyApp"
That causes the tests to run within MyApp.
By doing so you do not have to include every .m-file into the test target.
To run the test on a device plugin the device and select the scheme "MyAppTesting on device" and run as test. Assure that the mentioned scheme has set "Debug" within Test/Build Configuration which should be default.
Best regards.