mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
change: rename VLM name
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
hrp "github.com/httprunner/httprunner/v5"
|
||||
"github.com/httprunner/httprunner/v5/uixt/option"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestIOSSettingsAction(t *testing.T) {
|
||||
@@ -83,7 +84,7 @@ func TestAndroidAction(t *testing.T) {
|
||||
|
||||
func TestStartToGoal(t *testing.T) {
|
||||
userInstruction := `连连看是一款经典的益智消除类小游戏,通常以图案或图标为主要元素。以下是连连看的基本规则说明:
|
||||
1. 游戏目标: 玩家需要在规定时间内,通过连接相同的图案或图标,将它们从游戏界面中消除。
|
||||
1. 游戏目标: 玩家需要通过连接相同的图案或图标,将它们从游戏界面中消除。
|
||||
2. 连接规则:
|
||||
- 两个相同的图案可以通过不超过三条直线连接。
|
||||
- 连接线可以水平或垂直,但不能斜线,也不能跨过其他图案。
|
||||
@@ -91,9 +92,9 @@ func TestStartToGoal(t *testing.T) {
|
||||
3. 游戏界面:
|
||||
- 游戏界面通常是一个矩形区域,内含多个图案或图标,排列成行和列。
|
||||
- 图案或图标在未选中状态下背景为白色,选中状态下背景为绿色。
|
||||
4. 时间限制: 游戏通常设有时间限制,玩家需要在时间耗尽前完成所有图案的消除。
|
||||
5. 得分机制: 每成功连接并消除一对图案,玩家会获得相应的分数。完成游戏后,根据剩余时间和消除效率计算总分。
|
||||
6. 关卡设计: 游戏可能包含多个关卡,随着关卡的推进,图案的复杂度和数量会增加。
|
||||
4. 重试机制:
|
||||
- 游戏失败后,可以点击「立即复活」按钮,观看视频广告;30秒,点击屏幕右上角关闭图标后可继续游戏。
|
||||
- 若无法再复活,可以点击「立即挑战」按钮,重新开始游戏。
|
||||
|
||||
注意事项:
|
||||
1、当连接错误时,顶部的红心会减少一个,需及时调整策略,避免红心变为0个后游戏失败
|
||||
@@ -105,7 +106,7 @@ func TestStartToGoal(t *testing.T) {
|
||||
|
||||
testCase := &hrp.TestCase{
|
||||
Config: hrp.NewConfig("run ui action with start to goal").
|
||||
SetLLMService(option.LLMServiceTypeDoubaoVL),
|
||||
SetLLMService(option.DOUBAO_1_5_THINKING_VISION_PRO_250428),
|
||||
TestSteps: []hrp.IStep{
|
||||
hrp.NewStep("启动抖音「连了又连」小游戏").
|
||||
Android().
|
||||
@@ -117,14 +118,17 @@ func TestStartToGoal(t *testing.T) {
|
||||
StartToGoal(userInstruction, option.WithMaxRetryTimes(100)),
|
||||
},
|
||||
}
|
||||
err := hrp.NewRunner(t).Run(testCase)
|
||||
err := testCase.Dump2JSON("start_llk_game.json")
|
||||
require.Nil(t, err)
|
||||
|
||||
err = hrp.NewRunner(t).Run(testCase)
|
||||
assert.Nil(t, err)
|
||||
}
|
||||
|
||||
func TestAIAction(t *testing.T) {
|
||||
testCase := &hrp.TestCase{
|
||||
Config: hrp.NewConfig("run ui action with ai").
|
||||
SetLLMService(option.LLMServiceTypeDoubaoVL),
|
||||
SetLLMService(option.DOUBAO_1_5_THINKING_VISION_PRO_250428),
|
||||
TestSteps: []hrp.IStep{
|
||||
hrp.NewStep("launch settings").
|
||||
Android().AIAction("进入手机系统设置").
|
||||
|
||||
Reference in New Issue
Block a user