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 天前
软件测试工程师:面试题与经验分享
软件测试·面试·职场和发展
测试界的飘柔1 天前
月薪 20k 的性能测试面试题大曝光,让你如何迅速拿下 offer!
自动化测试·软件测试·功能测试·面试·职场和发展·职场经验·找工作
美团程序员1 天前
软件测试面试,如何自我介绍?
软件测试·面试·职场和发展·软件测试面试
念越2 天前
自动化测试入门指南:Selenium环境搭建+第一个实战案例
自动化测试·selenium·测试工具·蓝桥杯
liulilittle2 天前
Lua中检测32位序号环绕的方法
junit·单元测试·lua
汽车仪器仪表相关领域2 天前
液力传动精准标定 + 智能换挡控制,动力总成测试新高度:GZCVL T‑IV 变矩器变速箱测试系统实战全解
功能测试·单元测试·汽车·压力测试·可用性测试·安全性测试
深念Y3 天前
Chrome MCP Server 配置失败全记录:一场历时数小时的“fetch failed”排查之旅
前端·自动化测试·chrome·http·ai·agent·mcp
程序员小远3 天前
单元测试知识详解
自动化测试·软件测试·python·测试工具·职场和发展·单元测试·测试用例
Warren983 天前
Spring Boot + JUnit5 + Allure 测试报告完整指南
java·spring boot·后端·面试·单元测试·集成测试·模块测试