我尝试使用Calabash进行一些自动化的UI测试,当我在iOS 8模拟器上运行时,一切都很有效,但是,当我切换到iOS 7模拟器时,它并没有。似乎能够完全启动应用程序。
应用程序将打开,完成启动画面,然后不久它将崩溃,葫芦将再次重试。这将无限期地继续,直到我手动退出它。
在运行之间唯一改变的是我的设备目标,目前我正在使用以下设备目标:
DEVICE_TARGET="iPhone 5 (7.1 Simulator)"
当我在8.4设备上运行时,它看起来如下:
DEVICE_TARGET="iPhone 5 (8.4 Simulator)"
为什么这不起作用的任何想法? calabash-ios不支持7.1吗?
更多信息:
我感谢您提供的任何帮助!
答案 0 :(得分:1)
更新此SO answer有一些关于如何解决此问题的建议。
据官方统计,Calabash iOS在Yosemite上支持iOS> = 7.1模拟器,在Mavericks上支持iOS> = 7.0.3。
您在物理设备上遇到同样的问题吗?
如果你有:
您必须重新启动Mac才能使CoreSimulator环境保持良好状态。
话虽如此,我正在进行运行循环的集成测试,我看到在Yosemite的Xcode 6.4中启动iOS 7.1模拟器的无法解释的错误。看起来Uoseutomation在Yosemite上的iOS 7.1模拟器上不可用。
$ DEBUG=1 be run-loop instruments \
launch --app ./CalSmoke-cal.app \
--device "iPhone 5s (7.1 Simulator)"
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00000001032a6286 __pthread_kill + 10
1 libsystem_sim_c.dylib 0x0000000102fd4e59 abort + 101
2 com.apple.ScreenReaderCore 0x00000001047d3114 SCRCUncaughtExceptionHandler + 97
3 com.apple.CoreFoundation 0x0000000100691bf5 __handleUncaughtException + 629
4 libobjc.A.dylib 0x00000001025bebf5 _objc_terminate() + 94
5 libc++abi.dylib 0x0000000102e4de91 std::__terminate(void (*)()) + 8
6 libc++abi.dylib 0x0000000102e4d91d __cxa_throw + 124
7 libobjc.A.dylib 0x00000001025bea9d objc_exception_throw + 298
8 com.apple.CoreFoundation 0x000000010060d2ad +[NSException raise:format:] + 205
9 com.apple.UIAutomation 0x0000000100de96f7 +[UIAXElement initializeAccessibility] + 540
10 com.apple.UIAutomation 0x0000000100dec791 +[UIAXElement uiaxSystemWideElement] + 36
11 com.apple.UIAutomation 0x0000000100dff833 -[UIATarget init] + 300
12 com.apple.UIAutomation 0x0000000100dff6f9 +[UIATarget localTarget] + 53
13 ScriptAgent 0x0000000100008ea8 0x100000000 + 36520
14 ScriptAgent 0x0000000100004b17 0x100000000 + 19223
15 ScriptAgent 0x0000000100006e22 0x100000000 + 28194
16 libdyld.dylib 0x00000001031795c9 start + 1
我在运行循环中尝试了几个补丁,但没有任何工作。
还有来自Console.app
的内容com.apple.CoreSimulator.CoreSimulatorService[81434]: Failed to open
/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib:
dlopen(/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib, 1): no suitable image found.
Did find:
/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib:
mmap() error 1 at address=0x11837B000, size=0x00002000 segment=__TEXT in Segment::map()
mapping /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib