Files
httprunner/examples/uitest/android_e2e_delay_test.json
2025-06-28 22:03:22 +08:00

152 lines
4.5 KiB
JSON

{
"config": {
"name": "直播_抖音_端到端时延_android",
"variables": {
"device": "${ENV(SerialNumber)}",
"ups": "${ENV(LIVEUPLIST)}"
},
"android": [
{
"serial": "$device",
"log_on": true,
"adb_server_host": "localhost",
"adb_server_port": 5037,
"uia2_ip": "localhost",
"uia2_port": 6790,
"uia2_server_package_name": "io.appium.uiautomator2.server",
"uia2_server_test_package_name": "io.appium.uiautomator2.server.test"
}
]
},
"teststeps": [
{
"name": "启动抖音",
"android": {
"os_type": "android",
"actions": [
{
"method": "app_terminate",
"params": "com.ss.android.ugc.aweme"
},
{
"method": "app_launch",
"params": "com.ss.android.ugc.aweme"
},
{
"method": "home"
},
{
"method": "swipe_to_tap_app",
"params": "抖音",
"options": {
"max_retry_times": 5,
"tap_offset": [
0,
-50
]
}
},
{
"method": "sleep",
"params": 20
}
]
},
"validate": [
{
"check": "ui_ocr",
"assert": "exists",
"expect": "推荐",
"msg": "进入抖音失败"
}
]
},
{
"name": "点击放大镜",
"android": {
"os_type": "android",
"actions": [
{
"method": "tap_xy",
"params": [
0.9,
0.08
],
"options": {}
},
{
"method": "sleep",
"params": 5
}
]
}
},
{
"name": "输入账号名称",
"android": {
"os_type": "android",
"actions": [
{
"method": "input",
"params": "$ups",
"options": {}
},
{
"method": "sleep",
"params": 5
}
]
}
},
{
"name": "点击搜索",
"android": {
"os_type": "android",
"actions": [
{
"method": "tap_ocr",
"params": "搜索",
"options": {}
},
{
"method": "sleep",
"params": 5
}
]
}
},
{
"name": "端到端采集",
"loops": 5,
"android": {
"os_type": "android",
"actions": [
{
"method": "tap_ocr",
"params": "直播中",
"options": {
"index": -1,
"ignore_NotFoundError": true
}
},
{
"method": "live_e2e",
"options": {
"interval": 5,
"timeout": 120
}
},
{
"method": "tap_cv",
"options": {
"screenshot_with_ui_types": [
"close"
]
}
}
]
}
}
]
}