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

相关推荐
安畅检测齐鲁物联网测试中心13 小时前
软件测试到底能不能找出所有问题
自动化测试·软件测试·静态测试·风险管理·缺陷识别
kyriewen1 天前
前端测试:别为了100%覆盖率而写测试,那是自欺欺人
前端·javascript·单元测试
小短腿的代码世界1 天前
Qt券商接口封装深度解析:统一API设计与多源适配
开发语言·qt·单元测试
xixingzhe22 天前
Playwright 简介
自动化测试
小短腿的代码世界3 天前
Qt WebEngine深度解析:Chromium多进程架构与Qt信号槽的双向融合
qt·搜索引擎·单元测试
晓晓hh3 天前
JavaWeb学习——JUnit和日志
学习·junit·单元测试
测试员周周4 天前
【AI测试系统】第1篇:LangGraph 实战:用 State Graph 搭建 AI测试流水线(4 步编排 + RAG 增强 + 完整代码)
linux·windows·python·功能测试·microsoft·单元测试·多轮对话
测试19984 天前
接口测试工具:Postman的高级用法
自动化测试·软件测试·python·测试工具·测试用例·接口测试·postman