mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-07 00:39:34 +08:00
fix: TestSleepStrict
This commit is contained in:
@@ -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-5s,30% 随机间隔 5-10s",
|
||||
"android": {
|
||||
@@ -18,7 +41,6 @@
|
||||
{
|
||||
"method": "video_crawler",
|
||||
"params": {
|
||||
"app_package_name": "com.ss.android.ugc.aweme",
|
||||
"feed": {
|
||||
"sleep_random": [
|
||||
0,
|
||||
|
||||
@@ -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-5s,30% 随机间隔 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{}{
|
||||
|
||||
Reference in New Issue
Block a user