{ "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": 10 } ] }, "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": "滑动 Feed 3 次,随机间隔 0-5s", "android": { "actions": [ { "method": "swipe", "params": "up", "options": {} }, { "method": "sleep_random", "params": [ 0, 5 ] } ] }, "loops": 3 }, { "name": "滑动 Feed 1 次,随机间隔 5-10s", "android": { "actions": [ { "method": "swipe", "params": "up", "options": {} }, { "method": "sleep_random", "params": [ 5, 10 ] } ] }, "loops": 1 }, { "name": "滑动 Feed 10 次,70% 随机间隔 0-5s,30% 随机间隔 5-10s", "android": { "actions": [ { "method": "swipe", "params": "up", "options": {} }, { "method": "sleep_random", "params": [ 0, 5, 0.7, 5, 10, 0.3 ] } ] }, "loops": 10 }, { "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" } ] } ] }