Files
httprunner/examples/uitest/demo_android_live_swipe.json
2023-05-09 22:48:42 +08:00

152 lines
4.5 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"config": {
"name": "点播_抖音_滑动场景_随机间隔_android",
"variables": {
"device": "${ENV(SerialNumber)}"
},
"android": [
{
"serial": "$device"
}
]
},
"teststeps": [
{
"name": "启动抖音",
"android": {
"actions": [
{
"method": "app_terminate",
"params": "com.ss.android.ugc.aweme"
},
{
"method": "app_launch",
"params": "com.ss.android.ugc.aweme"
},
{
"method": "sleep",
"params": 5
}
]
},
"validate": [
{
"check": "ui_foreground_app",
"assert": "equal",
"expect": "com.ss.android.ugc.aweme",
"msg": "app [com.ss.android.ugc.aweme] should be in foreground"
}
]
},
{
"name": "处理青少年弹窗",
"android": {
"actions": [
{
"method": "tap_ocr",
"params": "我知道了",
"options": {
"ignore_NotFoundError": true
}
}
]
}
},
{
"name": "在推荐页上划,直到出现「点击进入直播间」",
"android": {
"actions": [
{
"method": "swipe_to_tap_text",
"params": "点击进入直播间",
"options": {
"identifier": "进入直播间",
"max_retry_times": 10
}
}
]
}
},
{
"name": "滑动 Feed 5 次60% 随机间隔 0-5s40% 随机间隔 5-10s",
"android": {
"actions": [
{
"method": "swipe",
"params": "up",
"options": {
}
},
{
"method": "sleep_random",
"params": [
0,
5,
0.6,
5,
10,
0.4
]
}
]
},
"loops": 5
},
{
"name": "向上滑动,等待 10s",
"android": {
"actions": [
{
"method": "swipe",
"params": "up",
"options": {
"identifier": "第一次上划"
}
},
{
"method": "sleep",
"params": 5
},
{
"method": "screenshot"
},
{
"method": "swipe",
"params": "up",
"options": {
"identifier": "第二次上划"
}
},
{
"method": "sleep",
"params": 5
},
{
"method": "screenshot"
}
]
}
},
{
"name": "exit",
"android": {
"actions": [
{
"method": "app_terminate",
"params": "com.ss.android.ugc.aweme"
}
]
},
"validate": [
{
"check": "ui_foreground_app",
"assert": "not_equal",
"expect": "com.ss.android.ugc.aweme",
"msg": "app [com.ss.android.ugc.aweme] should not be in foreground"
}
]
}
]
}