使用windows电脑做IOS自动化测试

一:搭建环境

python 3.6 以上
node
jdk
iTunes及驱动
pip3 install -U "tidevice[openssl]"  -->window电脑控制IOS的包
npm install -g appium  -->appium终端模式

二:运行
ios手机打开WDA服务
电脑打开三个终端运行
tidevice wdaproxy -B com.appiumtest22.WebDriverAgentRunner.xctrunner  --》打开电脑wda服务
appium    --》打开appium服务
tidevice perf -B 需要监听的程序包名 -o cpu,memory,network,fps > D:\ios_perf.dat   ---》性能保存文本

备注:
tidevice list  >查看IOS手机信息
tidevice applist >查看包名
tidevice其他命令:
https://github.com/alibaba/taobao-iphone-device

    def ios_list(self):
        """自动提取IOS手机信息"""
        a = os.popen("tidevice list").readlines()[1]
        ioslist = a.split(sep="  ", maxsplit=-1)
        while "" in ioslist:
            ioslist.remove("")
        return ioslist

        #"platformVersion": ioslist[4],
        #"deviceName": ioslist[3],
        #"udid": ioslist[0],
python+appium+ios 配置信息
        desired_caps = {
            "platformName": "IOS",    #系统
            "platformVersion": "15.5",  #系统版本
            "deviceName": "iPhone13", #手机型号
            "udid": "xxxxxxxxxx",  #手机设备号
            "bundleId": "xxxxxxxxxx",  #测试包名
            "webDriverAgentUrl": "http://127.0.0.1:8100",
            "noReset": 'true',
            "usePrebuiltWDA": 'false',
            "useXctestrunFile": 'false',
            "skipLogCapture": 'true',
            "automationName": "XCUITest"
        }
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值