appium默认60秒关闭应用的问题

问题:appium默认启动一个应用的session过期时间是60秒到时间会自动停了刚启动的应用,工作台打印:info: [debug] We shut down because no new commands came in的日志

分析:--command-timeout 60 The default command timeout for the server to use for all sessions (in seconds and should be less than 2147483). Will still be overridden by newCommandTimeout cap

意思是默认60秒过期,超过60秒就会自动

解决办法:

从appium工作台最前面找到,启动命令:

> Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --avd Nexus7 --platform-name Android --platform-version 19 --automation-name Appium --device-name "Android Emulator" --log-no-color

在cmd命令行,对应目录加时间参数即可:--command-timeout 600

在目录:C:\Program Files (x86)\Appium>

执行

node.exe node_modules\appium\lib\server\main.js --

address 127.0.0.1 --port 4723 --avd Android4.4.2 --device-ready-timeout 70 --pla

tform-name Android --platform-version 19 --automation-name Appium --avd Nexus7 -

-device-name "Android Emulator" --log-no-color --command-timeout 600

启动日志中就能看到:

info: [debug] Non-default server args: {"address":"127.0.0.1","logNoColors":true

,"avd":"Nexus7","androidDeviceReadyTimeout":"70","deviceName":"Android Emulator"

,"platformName":"Android","platformVersion":"19","automationName":"Appium","defa

ultCommandTimeout":600}

时间变成600秒了

【整整200集】超超超详细的Python接口自动化测试进阶教程合集,真实模拟企业项目实战

相关推荐
测试杂货铺1 天前
postman接口测试
自动化测试·软件测试·python·测试工具·测试用例·接口测试·postman
偷萧逸苦茶1 天前
软件测试相关问题
单元测试·测试用例
测试者家园1 天前
从DevOps到AIOps:智能体如何接管持续交付流程
软件测试·devops·aiops·敏捷测试·质量效能·智能化测试·测试开发和测试
测试者家园1 天前
接口测试不再难:智能体自动生成 Postman 集合
软件测试·人工智能·测试工具·postman·agent·智能化测试·测试开发和测试
不念霉运1 天前
关键领域软件测试新范式:如何在安全合规前提下提升效率?
软件测试·测试工具·安全·开源·desecvops·ci/di
sunshine__sun2 天前
单元测试基本步骤
单元测试
川石教育2 天前
接口测试中缓存处理策略
软件测试·接口自动化测试·接口测试·缓存处理
Tom Boom2 天前
Pytest断言全解析:掌握测试验证的核心艺术
自动化测试·python·测试开发·pytest
测试界茜茜3 天前
10:00开始面试,10:06就出来了,问的问题有点变态。。。
自动化测试·软件测试·功能测试·程序人生·面试·职场和发展
测试老哥3 天前
Postman参数化详解
自动化测试·软件测试·python·测试工具·职场和发展·测试用例·postman