gpt4 book ai didi

ios - Xcode 5 : Unit Tests not running

转载 作者:技术小花猫 更新时间:2023-10-29 10:42:45 25 4
gpt4 key购买 nike

我创建了一些测试用例,它们都通过了...那是因为它们没有运行。

从 Xcode,我得到:

Test Suite 'All tests' started at...Test Suite 'All tests' finished at...Executed 0 tests, with 0 failures (0 unexpected) in 0.00 seconds

The project (and unit test classes) build successfully.

All my test classes have MyApp_appTests as Target Membership selected. Production classes have MyApp_app & MyApp_appTests targets selected.

I verified the MyApp_appTests Target Build Settings (Bundle Loader & Test Host).

Bundle Loader (Debug): $(BUILT_PRODUCTS_DIR)/MyApp.app/MyApp
Test Host (Debug): $(BUNDLE_LOADER)

我已经导入了 SenTestingKit.framework(通过 Targets Build Phases“Link Binary With Libraries”)。

我所有的测试都以 -(void)testThat... 开头

我还检查了几个 stackoverflow.com 问题:

stackoverflow.com/questions/8632254/xcode-4-2-cant-run-unit-test stackoverflow.com/questions/3608484/ocunit-tests-not-running-not-being-found stackoverflow.com/questions/16672616/ocunit-test-cases-not-running

和这篇文章:

twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/

我不知道去哪里找...非常感谢任何帮助!

最佳答案

对我来说,在测试目标的build设置中将“Wrapper extension”从“octest”更改为“xctest”

enter image description here

关于ios - Xcode 5 : Unit Tests not running,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18948427/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com