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

相关推荐
蒸鱼Yuzheng9 小时前
游戏音频专项怎么测:事件触发、混音、打断、设备切换与资源一致性
软件测试·游戏测试·音频测试·qa面试·移动游戏
天才测试猿11 小时前
2026软件测试面试八股文(含答案+文档)
自动化测试·软件测试·python·功能测试·测试工具·面试·职场和发展
小龙飞刀1 天前
Chrome插件自动化测试:单元测试、集成测试
chrome·单元测试·集成测试
LayZhangStrive2 天前
claude code使用命令技巧(四)(开发沉淀的提示词模板)
ai·单元测试·prompt·ai编程·提示词·claude code
测试者家园3 天前
Harness由浅入深:CI/CD流水线里的质量门禁怎么设计
软件测试·人工智能·ci/cd·混沌测试·智能化测试·harness·质量门禁
小白上线*^_^*4 天前
Pytest 自动化测试框架速通指南(二)
软件测试·pytest·python测试框架·ai测试基础
栈溢出的浪漫4 天前
Python单元测试框架覆盖率-Coverage
python·单元测试·工具·覆盖率·coverage
天才测试猿5 天前
实例介绍:Unittest框架及自动化测试实现流程
自动化测试·软件测试·python·selenium·测试工具·职场和发展·测试用例
测试开发技术5 天前
AI 测试提效 | 告别手工写脚本,分享我的 Playwright + Skill 批量生成 UI 自动化脚本方案
自动化测试·人工智能·ui·自动化·agent·skill·ai测试