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接口自动化测试进阶教程合集,真实模拟企业项目实战

相关推荐
0和1的舞者15 小时前
《软件测试分类指南:8 大维度 + 核心要点梳理》
java·软件测试·单元测试·测试·黑盒测试·白盒测试·测试分类
卓码软件测评1 天前
CMA/CNAS软件测评机构:【Gatling XPath检查:XPath语法在XML响应中的应用】
测试工具·单元测试·测试用例
汽车仪器仪表相关领域1 天前
ZRT-I 精密减速器测试系统
大数据·运维·功能测试·安全·单元测试·负载均衡·压力测试
川石课堂软件测试1 天前
软件测试的白盒测试(二)之单元测试环境
开发语言·数据库·redis·功能测试·缓存·单元测试·log4j
renke33642 天前
Flutter 2025 测试工程体系:从单元测试到混沌演练,构建高可靠、可验证、自动化的质量保障闭环
flutter·单元测试·自动化
卓码软件测评2 天前
软件测试:如何在Postman中配置和自动化OAuth 2.0与JWT认证?
测试工具·单元测试·自动化·测试用例·postman·可用性测试
软件测试雪儿2 天前
Postman越来越难用了
软件测试·测试工具·jmeter·postman
爱吃 香菜2 天前
一文掌握接口测试三大工具:Jmeter、Postman、PyCharm
自动化测试·软件测试·测试工具·jmeter·接口测试·postman·职场经验
要开心吖ZSH2 天前
Spring Boot + JUnit 5 + Mockito + JaCoCo 单元测试实战指南
java·spring boot·junit·单元测试
超的小宝贝2 天前
软件测试期末复习
软件测试·测试