mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-08 08:57:40 +08:00
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>
39 lines
941 B
Go
39 lines
941 B
Go
//go:build localtest
|
|
|
|
package ai
|
|
|
|
import (
|
|
"bytes"
|
|
"fmt"
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestGetImageFromBuffer(t *testing.T) {
|
|
t.Skip("Skip CV test - requires external AI service and local image files")
|
|
imagePath := "/Users/debugtalk/Downloads/s1.png"
|
|
file, err := os.ReadFile(imagePath)
|
|
require.Nil(t, err)
|
|
buf := new(bytes.Buffer)
|
|
buf.Read(file)
|
|
|
|
service, err := NewVEDEMImageService()
|
|
require.Nil(t, err)
|
|
cvResult, err := service.ReadFromBuffer(buf)
|
|
assert.Nil(t, err)
|
|
fmt.Printf("cvResult: %v\n", cvResult)
|
|
}
|
|
|
|
func TestGetImageFromPath(t *testing.T) {
|
|
t.Skip("Skip CV test - requires external AI service and local image files")
|
|
imagePath := "/Users/debugtalk/Downloads/s1.png"
|
|
service, err := NewVEDEMImageService()
|
|
require.Nil(t, err)
|
|
cvResult, err := service.ReadFromPath(imagePath)
|
|
assert.Nil(t, err)
|
|
fmt.Printf("cvResult: %v\n", cvResult)
|
|
}
|