软件测试软件测试软件测试

Fastmonkey-xcode9.2/Xcode10.1 爬坑

2018-12-17  本文已影响11人  云层_

本篇基于如下两套环境配置的总结:

Xcode 9.2 + Fastmonkey-xcode9.2

Xcode 10.1 + Fastmonkey-master

xcode9.2/Xcode10.1 执行后提示:

Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'XCTestWDUITests/Info.plist'.,如图

原因:xcode buildsetting有问题。 xctestwd中没有用到oc,swift混编,header search path,objecktive-c bridging header 配置可去掉再试试。xctestwduitest中用了混编才需要 xctestwduitest-bridging-header.h

解决:选中工程,点击Info.plist搜索结果下方的‘-’或者选中后delete键,使它从Build Phase的Copy Bundle Resource移除

xcode9.2/Xcode10.1 :编译提示 swift compiler error ,如图1

解决:下载工程所依赖的包 前,修改目录中的Cartfile文件:更改swift的版本,Xcode9.2更改为图2,Xcode10.1无需更改

图1 图2

Fastmonkey下载依赖包报错

执行arthage update    或    arthage update --no-use-binaries  执行失败

解决:Xcode > Preferences > Locations,选择Xcode的版本,即可

xcode9.2/Xcode10.1 工程执行失败,提示:test field ,且未生成日志:

解决:未解决,但不影响使用

xcode9.2/Xcode10.1 运行后如何查看执行日志?

解决:

Xcode9.2执行后提示swift编译失败,或者不支持某函数,则因为版本过低

解决:修改cartfile,swift版本改为4.2.0,并重新终端update

运行完成后日志会报错:LLVM Profile Error: Failed to write file "default.profraw": Operation not permitted

每次运行完成后日志会报错,这个错误是由于Fastmonkey的Bug,参加下面Issue链接,主要原因是当执行时长一到时,Monkey测试自行停止,这个停止是强退的,但Xctest没有正常退出造成的,目前还没有找到好的解决方法。

运行完成后日志报错:Restarting after unexpected exit or crash in XCTextWDRunner/testRunner(); summary will include totals from previous launches.

查看fastmonkey执行日志

Users/xxxx/Library/Developer/Xcode/DerivedData/XCTestWD-byqpelbzygjptgbegfauyaoyhxbk/Logs/Test,  -----找不到该目录

解决:是因为Users/xxxx/Library,该资源是隐藏文件夹,需要把隐藏文件显示出来,command+shift+.      如下图所示:

接下

Xcode9.2 跑fastmonkey,能在手机上点点点,但是最后提示test field,且没有生成日志文件  ------不是问题,不影响,超时导致!!😂

code10.1执行ios11.4/11.2报错如下:Module file's minimum deployment target is ios11.4 v11.4: /Users/shipanpan/Library/Developer/Xcode/

解决:

虽然连的iOS11.x的版本把iOS版本改为9

清除缓存:把DerivedData这个文件夹直接删掉:

然后执行,会报错如下:

再次执行即可:

----虽然可以执行手机点点点了,但是遇到了和Xcode9.2同样的问题,不过,如果能跑起来 超时了报fail是已知问题,不影响!!!更乐观的是还生成了日志

日志如下:

更新测试包修改bundle ID/运行时长后,编译失败,提示如下:

This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed. 如图1

原因:iPhone上已经装了包标识符一样的 App,删掉再运行。如图2

图1 图2
上一篇 下一篇

猜你喜欢

热点阅读