fix: TestSleepStrict

This commit is contained in:
lilong.129
2023-08-24 21:33:11 +08:00
parent be87a2cdcc
commit f7eb196a8e
8 changed files with 40 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
{
"project_name": "demo-empty-project",
"create_time": "2023-08-20T13:45:40.143346+08:00",
"create_time": "2023-08-24T21:20:48.397396+08:00",
"hrp_version": "v4.3.6"
}

View File

@@ -1,5 +1,5 @@
{
"project_name": "demo-with-go-plugin",
"create_time": "2023-08-20T13:45:08.158221+08:00",
"create_time": "2023-08-24T21:20:18.184017+08:00",
"hrp_version": "v4.3.6"
}

View File

@@ -1,5 +1,5 @@
{
"project_name": "demo-with-py-plugin",
"create_time": "2023-08-20T13:45:08.924868+08:00",
"create_time": "2023-08-24T21:20:23.45156+08:00",
"hrp_version": "v4.3.6"
}

View File

@@ -1,5 +1,5 @@
{
"project_name": "demo-without-plugin",
"create_time": "2023-08-20T13:45:40.029489+08:00",
"create_time": "2023-08-24T21:20:47.861732+08:00",
"hrp_version": "v4.3.6"
}

View File

@@ -11,6 +11,29 @@
]
},
"teststeps": [
{
"name": "启动 app",
"android": {
"actions": [
{
"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": "滑动消费 feed 至少 10 个live 至少 3 个滑动过程中70% 随机间隔 0-5s30% 随机间隔 5-10s",
"android": {
@@ -18,7 +41,6 @@
{
"method": "video_crawler",
"params": {
"app_package_name": "com.ss.android.ugc.aweme",
"feed": {
"sleep_random": [
0,

View File

@@ -17,11 +17,17 @@ func TestAndroidVideoCrawlerTest(t *testing.T) {
}).
SetAndroid(uixt.WithSerialNumber("$device")),
TestSteps: []hrp.IStep{
hrp.NewStep("启动 app").
Android().
ScreenShot(uixt.WithScreenShotOCR(true), uixt.WithScreenShotUpload(true)).
AppLaunch("com.ss.android.ugc.aweme").
Sleep(5).
Validate().
AssertAppInForeground("com.ss.android.ugc.aweme"),
hrp.NewStep("滑动消费 feed 至少 10 个live 至少 3 个滑动过程中70% 随机间隔 0-5s30% 随机间隔 5-10s").
Android().
VideoCrawler(map[string]interface{}{
"app_package_name": "com.ss.android.ugc.aweme",
"timeout": 600,
"timeout": 600,
"feed": map[string]interface{}{
"target_count": 5,
"target_labels": []map[string]interface{}{