mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
introduce expert test for both integration and regression
This commit is contained in:
@@ -0,0 +1,468 @@
|
||||
{
|
||||
"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 以及 ui_foreground_app equal 断言",
|
||||
"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": "处理青少年弹窗 tap ocr 以及 ui_ocr exists 断言",
|
||||
"ios": {
|
||||
"actions": [
|
||||
{
|
||||
"method": "tap_ocr",
|
||||
"params": "我知道了",
|
||||
"options": {
|
||||
"ignore_NotFoundError": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"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",
|
||||
"params": [
|
||||
"dyhouse",
|
||||
"shoppingbag"
|
||||
],
|
||||
"options": {
|
||||
"identifier": "click_sales_rack"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "sleep",
|
||||
"params": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "app_terminate 以及 ui_foreground_app not_equal 断言",
|
||||
"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": "处理青少年弹窗 tap ocr 以及 ui_ocr exists 断言",
|
||||
"ios": {
|
||||
"actions": [
|
||||
{
|
||||
"method": "tap_ocr",
|
||||
"params": "我知道了",
|
||||
"options": {
|
||||
"ignore_NotFoundError": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"validate": [
|
||||
{
|
||||
"check": "ui_ocr",
|
||||
"assert": "exists",
|
||||
"expect": "推荐",
|
||||
"msg": "进入抖音失败"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "【点播】滑动消费",
|
||||
"ios": {
|
||||
"actions": [
|
||||
{
|
||||
"method": "video_crawler",
|
||||
"params": {
|
||||
"feed": {
|
||||
"sleep_random": [
|
||||
0,
|
||||
5,
|
||||
0.6,
|
||||
5,
|
||||
15,
|
||||
0.2,
|
||||
15,
|
||||
50,
|
||||
0.2
|
||||
],
|
||||
"target_count": 10,
|
||||
"target_labels": [
|
||||
{
|
||||
"regex": true,
|
||||
"scope": [
|
||||
0,
|
||||
0.5,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"text": "^广告$"
|
||||
},
|
||||
{
|
||||
"regex": true,
|
||||
"scope": [
|
||||
0,
|
||||
0.5,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"text": "^图文$"
|
||||
},
|
||||
{
|
||||
"regex": true,
|
||||
"scope": [
|
||||
0,
|
||||
0.5,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"text": "^特效\\|"
|
||||
},
|
||||
{
|
||||
"regex": true,
|
||||
"scope": [
|
||||
0,
|
||||
0.5,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"text": "^模板\\|"
|
||||
},
|
||||
{
|
||||
"regex": true,
|
||||
"scope": [
|
||||
0,
|
||||
0.5,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"text": "^购物\\|"
|
||||
}
|
||||
]
|
||||
},
|
||||
"live": {
|
||||
"sleep_random": [
|
||||
20,
|
||||
20
|
||||
],
|
||||
"target_count": 0
|
||||
},
|
||||
"timeout": 600
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"method": "sleep_random",
|
||||
"params": [
|
||||
1,
|
||||
3
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"loops": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user