Tag: testing

Xcode 5:unit testing没有运行

我创build了一些testing用例,他们都通过了…这是因为他们没有运行。 从Xcode,我得到: testing套件“所有testing”开始于… testing套件“所有testing”在…完成 执行0次testing,在0.00秒内发生0次失败(意外0次) 项目(和unit testing类)成功构build。 所有我的testing类都selectMyApp_appTests作为目标成员。 生产类select了MyApp_app&MyApp_appTests目标。 我validation了MyApp_appTests目标构build设置(Bundle Loader&Test Host)。 Bundle Loader (Debug): $(BUILT_PRODUCTS_DIR)/MyApp.app/MyApp Test Host (Debug): $(BUNDLE_LOADER) 我已经导入SenTestingKit.framework(通过目标构build阶段“链接二进制库”)。 我的所有testing都以-(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试验的情况下,不运行的 和这个职位: twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/ 我不知道在哪里寻找…任何帮助,非常感谢!

如何从Xcode中的代码覆盖排除Pod

有没有办法从代码覆盖排除豆荚? 我只希望看到代码覆盖率为我写的代码。 不是,它应该很重要,但我使用Xcode 8。

如何使用KIF框架来模拟位置服务

我使用KIF框架( http://github.com/kif-framework/KIF )进行UItesting,我需要模拟位置服务。 问题是位置服务启动BEFORE KIF方法-beforeAll被调用。 所以嘲笑已经太迟了。 任何build议,将不胜感激。

iOS TestFlight – 外部testing人员未通知新build

我已经向外部TestFlight用户提供了一个应用程序。 他们收到了电子邮件,并按预期安装了应用程序。 他们有版本1.0,版本1。 不过,我现在已经上传了一个新的版本(版本1.0,版本2)。 这已经得到批准。 在“外部testing”页面中,我添加并select了新版本。 这个新版本现在说'testing'。 但是,以前的构build的用户还没有收到任何通知,并在TestFlight应用程序,它仍然说生成1。 有谁知道我可以如何使目前的用户得到新的构build? 我认为这将是自动的,我无法find任何有关这种情况的信息。

应用程序在Testflight中不兼容iPhone 4和5

我几乎完成了我的应用程序,我现在正在testing它。 问题是,我不能让它在iPhone 4s和iPhone 5上工作。部署目标设置为8.0,并且它在iPhone 4s模拟器上运行完美。 当我的testing人员打开TestFlight时,他们可以看到兼容设备的列表,而拥有iPhone 5s以上设备的人无法安装它。 这是我的testing人员在TestFlight中看到的: 另一个奇怪的是,它与iPad兼容,但我只在Xcode中将我的设备设置为iPhone。 我试图研究这个,但我只能find有关自动布局和大小问题的问题。 我已经确定所有设备上的一切都应该看起来不错,我错过了什么?

无法在Xcode 6 Beta 5上运行testing

我有一个使用Kiwitesting框架(我从cocoapods安装的最新版本2.3.0)的iOS项目。 起初,当我运行testing时,我收到一个错误,它找不到XCTest.h。 所以我遵循这个答案的build议: https : //stackoverflow.com/a/24651704/1082326和问题消失了。 然而,不同的问题出现了,现在当我尝试运行testing时,模拟器select“iPhone 5(8.0)”,然后我得到以下错误: IDEBundleInjection.c: Error 3587 loading bundle '/Users/ifeins/Library/Developer/Xcode/DerivedData/teacup- aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator/teacup-tests.octest': The bundle “teacup-tests.octest” couldn't be loaded because it is damaged or missing necessary resources. DevToolsBundleInjection environment: XCInjectDiagnostics: (null) XCInjectBundleInto: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup- aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator/valet.app/valet XCInjectBundle: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup- aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator/teacup-tests.octest TestBundleLocation: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup- aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator/teacup-tests.octest TMPDIR: /Users/ifeins/Library/Developer/CoreSimulator/Devices/BC59F7AC-9D3E-4FFC-9726- 97911AA597A6/data/Containers/Data/Application/E1D4A3F0-C06B-485D-BF87-9F5EA70D974A/tmp DYLD_LIBRARY_PATH: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup- aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator DYLD_INSERT_LIBRARIES: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFra meworks/IDEBundleInjection.framework/IDEBundleInjection DYLD_FRAMEWORK_PATH: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup- aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator DYLD_FALLBACK_LIBRARY_PATH: […]

TestFlight iOS应用程序get-task-allow问题

我有一个名为MapItTrackIt的ios的testflight应用程序。 一切都很好。 我只是更新到Xcode 5.1。 我build立的应用程序完全一样,我一直有。 相同的configuration文件和专门的证书。 这一次,当我尝试上传我的IPA文件,我得到“无效的configuration文件:开发人员build设权利必须有get-task-allow设置为true”。 错误。 我没有改变什么configuration或什么不是。 我只是增加了一些function的应用程序和rev'ed版本。 我现在做什么? 我该如何解决? 我的老板现在想要这个部署,我不能。

Xcode UItesting – 用addSubview添加的Uiviews对于UItesting是完全不可见的

我一直在尝试XCode 7.3上的新的UItesting,我发现这对我来说似乎是一个错误。 问题是,通过“ addSubview ”方法添加的视图似乎对UItesting系统是完全不可见的。 我有这样的看法: 而这个UIview创build代码: let container = UIView(frame: CGRectMake(0, 0, 375, 200)) container.backgroundColor = UIColor.orangeColor() container.isAccessibilityElement = false let label = UILabel(frame: CGRectMake(0, 100, 375, 20)) label.backgroundColor = UIColor.yellowColor() label.textAlignment = NSTextAlignment.Center label.accessibilityIdentifier = "labelIdentifier" label.text = "I am a label" container.addSubview(label) 而这个简单的UItesting: func testExample() { let final = XCUIApplication().staticTexts.containingType(.StaticText, identifier: "labelIdentifier").element […]

如何从每个用户界面的空核心数据开始在Swift中testing断言?

我有一个使用核心数据的应用程序。 应用程序的行为取决于数据是否已被填充。 我希望,在每个testing案例之前,核心数据将被清空,使得每个testing用例都运行在一个新的应用程序实例上。 testing用例不应该依赖某个testing设备的状态,尤其是因为其他testing用例操纵这个状态。 不幸的是,默认情况下,核心数据不仅在testing用例之间,而且在完全独立的testing运行之间。 我试图解决这个问题。 我的第一个想法是将所有核心数据转储到拆卸函数中。 这样每个testing都会自行清理。 不幸的是,我无法用这个命令获得一个NSManagedObjectContext: let context = (UIApplication.sharedApplication().delegate as! MyApp.AppDelegate).managedObjectContext! 因为它有这个编译器错误: Undefined symbols for architecture x86_64: "type metadata accessor for MyApp.AppDelegate", referenced from: MyAppUITests.MyAppUITests.tearDown 为了解决这个错误,我尝试将UITests添加到AppDelegate目标成员资格并执行@testable import MyApp 。 都没有工作。 我需要managedObjectContext清空核心数据。 现在我认为在每个testing用例运行的开始或结束时,必须有一个更好的内置方法来转储所有的核心数据。 最好是在最后,因为每个testing应该自行清理。 有人知道如何做到这一点? 提前致谢!

检查静态库的iOS部署目标

我有很多像libBlah.a静态库file工具,我可以检查支持的体系结构。 (arm64或i386) 有工具来检查静态库的iOS Deployment Target ?