Files
httprunner/examples/game/zhuadae/game_zhuadae.json
2025-07-04 14:23:09 +08:00

112 lines
4.1 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"config": {
"name": "抓大鹅小游戏自动化测试",
"variables": {
"package_name": "com.ss.android.ugc.aweme"
},
"ai_options": {
"llm_service": "doubao-1.5-thinking-vision-pro-250428"
}
},
"teststeps": [
{
"name": "启动抖音 app",
"android": {
"os_type": "android",
"actions": [
{
"method": "app_launch",
"params": "$package_name"
},
{
"method": "sleep",
"params": 5
}
]
},
"validate": [
{
"check": "ui_foreground_app",
"assert": "equal",
"expect": "$package_name",
"msg": "app [$package_name] should be in foreground"
}
]
},
{
"name": "启动「抓大鹅」小游戏",
"android": {
"os_type": "android",
"actions": [
{
"method": "start_to_goal",
"params": "搜索「抓大鹅」,启动小游戏",
"options": {
"pre_mark_operation": true
}
}
]
},
"validate": [
{
"check": "ui_ai",
"assert": "ai_assert",
"expect": "当前页面底部包含「抓大鹅」按钮",
"msg": "assert ai prompt [当前页面底部包含「抓大鹅」按钮] failed"
}
]
},
{
"name": "进入「抓大鹅」小游戏",
"android": {
"os_type": "android",
"actions": [
{
"method": "start_to_goal",
"params": "点击「抓大鹅」,进入小游戏",
"options": {
"pre_mark_operation": true
}
}
]
},
"validate": [
{
"check": "ui_ai",
"assert": "ai_assert",
"expect": "当前页面底部包含「移出」「凑齐」「打乱」按钮",
"msg": "assert ai prompt [当前页面底部包含「移出」「凑齐」「打乱」按钮] failed"
}
]
},
{
"name": "开始游戏",
"android": {
"os_type": "android",
"actions": [
{
"method": "start_to_goal",
"params": "抓大鹅是一款抓取类小游戏,以下是游戏的基本规则说明:\n1. 游戏目标: 玩家需要通过抓取图案来完成关卡,最终目标是清空所有图案。\n2. 抓取规则:\n- 游戏界面中会出现多个图案,图案存在多层堆叠的情况,玩家需要点击图案将其抓取放入到槽中。\n- 当抓取到三个相同的图案放入抓取槽时,这三个图案会成功消除。\n- 需要尽量避免抓取槽满的情况,抓取槽满时游戏失败。\n- 游戏通关后继续进入下一关,游戏失败后重新开始游戏。\n\n请严格按照以上游戏规则开始游戏\n",
"options": {
"time_limit": 300,
"pre_mark_operation": true
}
}
]
}
},
{
"name": "退出抖音 app",
"android": {
"os_type": "android",
"actions": [
{
"method": "app_terminate",
"params": "$package_name"
}
]
}
}
]
}