Files
httprunner/examples/uitest/bili/android/cli_test.go
claude[bot]anddebugtalk a8f218ec25 fix: add skip statements to mobile-dependent tests
Added skip statements to all tests with //go:build localtest build tag that require physical mobile devices or external services. This prevents test failures in CI/CD environments where devices are not available.

Tests skipped:
- Android UI tests (require ADB device)
- iOS UI tests (require WDA device)
- HarmonyOS tests (require HDC device)
- AI service tests (require external LLM services)
- Upload tests (require external HTTP services)
- Device driver extension tests (require physical devices)

Total: 150+ test functions across 25 files now properly skip instead of fail.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: debugtalk <debugtalk@users.noreply.github.com>
2025-08-02 14:55:06 +00:00

38 lines
739 B
Go

//go:build localtest
package main
import (
"testing"
hrp "github.com/httprunner/httprunner/v5"
)
func TestMain(t *testing.T) {
t.Skip("Skip Bilibili test - requires physical Android device")
main()
}
func TestRunCaseWithShell(t *testing.T) {
t.Skip("Skip Bilibili test - requires physical Android device")
testcase1 := &hrp.TestCase{
Config: hrp.NewConfig("run ui test on bili android").
WithVariables(map[string]interface{}{
"SerialNumber": "${ENV(SerialNumber)}",
"RunTimes": 3,
}),
TestSteps: []hrp.IStep{
hrp.NewStep("run bili android").
Shell("bili_android"),
},
}
testcase1.Dump2JSON("bili_android.json")
r := hrp.NewRunner(t)
err := r.Run(testcase1)
if err != nil {
t.Fatal()
}
}