美文网首页
IOS monkey测试 基于Fastmonkey 的爬坑之旅(

IOS monkey测试 基于Fastmonkey 的爬坑之旅(

作者: 一缕曙光_990d | 来源:发表于2019-04-28 16:26 被阅读0次

Xcode+Fastmonkey+iOS   Monkey问题

一、环境准备:

1 、Xcode 10.1 (也可是其他版本)   ——(用于导入Faskmonkey工程及运行monkey测试)

2 、iOS 第三方库管理工具-Carthage ——(下载Faskmonkey工程所依赖的第三方库)

3 、iOS开发者证书文件——(用于工程中的构建及签名、团队或个人都行)

4 、Fastmonkey-master工程代码 ,github上下载,

[if !supportLists]l [endif]命令如下:

git clone https://github.com/zhangzhao4444/Fastmonkey.git

[if !supportLists]l [endif]直接下载,链接如下:

https://github.com/zhangzhao4444/Fastmonkey 

[if !supportLists]l [endif]下载版本需要注意

Xcode 9.2 + Fastmonkey-xcode9.2

Xcode 10.1 + Fastmonkey-master

5、真机一部,且已安装app  —— 获取ipa,手工安装(推荐)

二、Fastmonkey工程下载后配置(个人免费开发者账号)

1、在终端打开下载Fastmonkey的位置:/Users/xxx/Fastmonkey/XCTestWD-master在终端中修改XCTestWD-master目录中的Cartfile文件,修改如下:(xcode10.1跟我一个配置就可以 update成功)

github "httpswift/swifter" == 1.4.3

github "SwiftyJSON/SwiftyJSON" == 4.0.0

github "cezheng/Fuzi" ~> 2.1.0

github "tadija/AEXML" == 4.2.2

github "CocoaLumberjack/CocoaLumberjack" == 3.5.2    

github "Quick/Nimble"

2、下载Fastmonkey工程依赖的包(每一次更改Cartfile文件的配置都需要carthage update)

[if !supportLists]l [endif]在终端执行终端执行carthage update(更新时间过长)

若果有报错,在Xcode > Preferences > Locations,选择Xcode的版本,即可  

注:xcode10.1对应的

三、配置XCTestWD项目工程

1、用Xcode打开XCTestWD.xcodeproj,进行配置

[if !supportLists]l [endif]在XCTestWD->General->Signing->Team,把账号配置一下

[if !supportLists]l [endif]XCTestWD->General->Bundle Identifier改成自己的,可以自定义,不要重复

[if !supportLists]l [endif]XCTestWDUITests-> General->Signing->Team 配置一下账号

[if !supportLists]l [endif]XCTestWDUITests->Build Settings->Packaging->Product Bundle Identifier改成自己的,可以自定义,不要重复

2、XCTestWD->Server->XCTestWDMonkey.swift文件讲bundleID 修改为自己APP的bundleID

3、XCTestWD->Server->Controllers->Monkey.swift文件修改执行时长(单位是秒)

四、执行Fastmonkey

1、选择要执行的手机与Target注意App事先安装到被测试手机上,手机已经插入Mac电脑USB接口(从下拉列表中选择XCTestWDUITests与手机)

2、执行monkey(选择【Product】--【Test】执行Monkey测试)

3、在手机上看monkey的运行就可以了

五、查看monkey运行的日志

1、下载VSCode 工具:https://visualstudio.microsoft.com/zh-hans/downloads/

2、查看Fastmonkey执行的日志(自己查看自己文件的位置去找,这是大致位置)

/Users/zhiyue/Library/Developer/Xcode/DerivedData/XCTestWD-ermaobirkahgmlafcknszizwcinr/Logs/Test

找到日志后,使用VSCode工具打开

六,参考文档

[if !supportLists]1、 [endif]iOS测试-Fastmonkey:https://www.cnblogs.com/mcboy/p/9074622.html

[if !supportLists]2、 [endif]Fastmonkey:iOS压测(Xcode10.1):https://www.jianshu.com/p/f7edc3695a63

[if !supportLists]3、 [endif]Fastmonkey-Xcode9.2/Xcode10.1爬坑:https://www.jianshu.com/p/ed9e453da3a3

[if !supportLists]4、 [endif]https://testerhome.com/topics/9524

如果遇到不可解决的问题 请加我QQ:591380133(备注简书)

相关文章

网友评论

      本文标题:IOS monkey测试 基于Fastmonkey 的爬坑之旅(

      本文链接:https://www.haomeiwen.com/subject/qlqqzftx.html