{ "config": { "name": "iOS 专家用例", "variables": { "app_name": "抖音", "bundle_id": "com.ss.iphone.ugc.Aweme", "device": "${ENV(UDID)}", "query": "${ENV(query)}" }, "ios": [ { "udid": "$device", "port": 8700, "mjpeg_port": 8800, "log_on": true } ] }, "teststeps": [ { "name": "启动应用程序 app_launch", "ios": { "actions": [ { "method": "app_launch", "params": "$bundle_id" }, { "method": "sleep", "params": 2 } ] } }, { "name": "home 以及 swipe_to_tap_app 默认配置", "ios": { "actions": [ { "method": "home" }, { "method": "swipe_to_tap_app", "params": "$app_name", "options": {} }, { "method": "sleep", "params": 10 } ] } }, { "name": "处理弹窗 close_popups 默认配置 以及 ui_ocr exists 断言", "ios": { "actions": [ { "method": "close_popups", "options": {} } ] }, "validate": [ { "check": "ui_ocr", "assert": "exists", "expect": "推荐", "msg": "进入抖音失败" } ] }, { "name": "【直播】feed头像或卡片进房 swipe_to_tap_texts 自定义配置", "ios": { "actions": [ { "method": "swipe_to_tap_texts", "params": [ "直播", "直播中", "点击进入直播间" ], "options": { "identifier": "click_live", "max_retry_times": 50, "interval": 1.5, "direction": [ 0.5, 0.7, 0.5, 0.3 ], "scope": [ 0.2, 0.2, 1, 0.8 ] } } ] } }, { "name": "sleep 10s", "ios": { "actions": [ { "method": "sleep", "params": 10 } ] } }, { "name": "【直播】swipe 自定义配置 以及 back", "ios": { "actions": [ { "method": "swipe", "params": [ 0.5, 0.7, 0.5, 0.3 ], "options": { "identifier": "slide_in_live" } }, { "method": "sleep", "params": 5 }, { "method": "back", "options": {} }, { "method": "sleep", "params": 5 } ] } }, { "name": "【搜索】点击放大镜 tap_xy 自定义配置", "ios": { "actions": [ { "method": "tap_xy", "params": [ 0.9, 0.075 ], "options": { "identifier": "click_search_in_middle_page" } }, { "method": "sleep", "params": 5 } ] } }, { "name": "【搜索】输入query词 input", "ios": { "actions": [ { "method": "input", "params": "$query", "options": { "identifier": "input_query" } }, { "method": "sleep", "params": 5 } ] } }, { "name": "【搜索】点击搜索按钮 tap_ocr 自定义配置", "ios": { "actions": [ { "method": "tap_ocr", "params": "搜索", "options": { "identifier": "click_search_after_input_query" } }, { "method": "sleep", "params": 5 } ] } }, { "name": "选择直播页签 tap_ocr 默认配置", "ios": { "actions": [ { "method": "tap_ocr", "params": "直播", "options": {} }, { "method": "sleep", "params": 5 } ] } }, { "name": "【生活服务】进入直播间 tap_xy", "ios": { "actions": [ { "method": "tap_xy", "params": [ 0.5, 0.5 ], "options": {} }, { "method": "sleep", "params": 5 } ] } }, { "name": "【生活服务】点击货架商品 tap_ocr 自定义配置", "ios": { "actions": [ { "method": "tap_cv", "options": { "identifier": "click_sales_rack", "screenshot_with_ui_types": [ "dyhouse", "shoppingbag" ] } }, { "method": "sleep", "params": 5 } ] } }, { "name": "终止应用程序 app_terminate", "ios": { "actions": [ { "method": "app_terminate", "params": "$bundle_id" }, { "method": "sleep", "params": 2 } ] } }, { "name": "home 以及 swipe_to_tap_app 自定义配置", "ios": { "actions": [ { "method": "home" }, { "method": "swipe_to_tap_app", "params": "$app_name", "options": { "max_retry_times": 5, "interval": 1, "offset": [ 0, -50 ] } }, { "method": "sleep", "params": 10 } ] } }, { "name": "处理弹窗 close_popups 自定义配置 以及 ui_ocr exists 断言", "ios": { "actions": [ { "method": "close_popups", "options": { "max_retry_times": 3, "interval": 2 } } ] }, "validate": [ { "check": "ui_ocr", "assert": "exists", "expect": "推荐", "msg": "进入抖音失败" } ] }, { "name": "返回主界面,并打开本地时间戳", "ios": { "actions": [ { "method": "home" }, { "method": "app_terminate", "params": "$bundle_id" }, { "method": "sleep", "params": 3 }, { "method": "swipe_to_tap_app", "params": "local", "options": { "max_retry_times": 5 } }, { "method": "sleep", "params": 10 } ] } }, { "name": "screeshot 以及 sleep_random", "ios": { "actions": [ { "method": "screenshot", "options": {} }, { "method": "sleep_random", "params": [ 1, 3 ] } ] }, "loops": 3 } ] }