change: GenNameWithTimestamp

This commit is contained in:
lilong.129
2023-04-17 22:45:58 +08:00
parent a988a2341f
commit 58f1fec2fa
12 changed files with 151 additions and 17 deletions

View File

@@ -0,0 +1,134 @@
{
"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": "我知道了",
"ignore_NotFoundError": true
}
]
}
},
{
"name": "滑动 Feed 3 次,随机间隔 0-5s",
"android": {
"actions": [
{
"method": "swipe",
"params": "up"
},
{
"method": "sleep_random",
"params": [
0,
5
]
}
]
},
"loops": 3
},
{
"name": "滑动 Feed 1 次,随机间隔 5-10s",
"android": {
"actions": [
{
"method": "swipe",
"params": "up"
},
{
"method": "sleep_random",
"params": [
5,
10
]
}
]
},
"loops": 1
},
{
"name": "滑动 Feed 10 次70% 随机间隔 0-5s30% 随机间隔 5-10s",
"android": {
"actions": [
{
"method": "swipe",
"params": "up"
},
{
"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"
}
]
}
]
}

View File

@@ -50,7 +50,7 @@ func TestAndroidDouyinFeedTest(t *testing.T) {
},
}
if err := testCase.Dump2JSON("demo_feed_random_slide.json"); err != nil {
if err := testCase.Dump2JSON("demo_android_feed_random_swipe.json"); err != nil {
t.Fatal(err)
}

View File

@@ -109,7 +109,7 @@
}
]
},
"loops": 10
"loops": 2
},
{
"name": "exit",

View File

@@ -45,10 +45,7 @@ func TestIOSDouyinLive(t *testing.T) {
},
}
if err := testCase.Dump2JSON("demo_douyin_live.json"); err != nil {
t.Fatal(err)
}
if err := testCase.Dump2YAML("demo_douyin_live.yaml"); err != nil {
if err := testCase.Dump2JSON("demo_ios_live_swipe.json"); err != nil {
t.Fatal(err)
}