refactor: move uixt API

This commit is contained in:
debugtalk
2022-12-13 23:31:02 +08:00
parent 1332e71258
commit 94b17a97c9
17 changed files with 189 additions and 424 deletions

View File

@@ -1,10 +1,5 @@
package hrp
import (
"github.com/httprunner/httprunner/v4/hrp/pkg/gidevice"
"github.com/httprunner/httprunner/v4/hrp/pkg/uixt"
)
type StepType string
const (
@@ -19,39 +14,6 @@ const (
stepTypeIOS StepType = "ios"
)
var (
WithIdentifier = uixt.WithIdentifier
WithMaxRetryTimes = uixt.WithMaxRetryTimes
WithWaitTime = uixt.WithWaitTime // only applicable to SwipeToTap* action
WithIndex = uixt.WithIndex // index of the target element, should start from 1, only applicable to ocr actions
WithTimeout = uixt.WithTimeout
WithIgnoreNotFoundError = uixt.WithIgnoreNotFoundError
WithText = uixt.WithText
WithID = uixt.WithID
WithDescription = uixt.WithDescription
WithDuration = uixt.WithDuration // only applicable to ios swipe action
WithSteps = uixt.WithSteps // only applicable to android swipe action
WithDirection = uixt.WithDirection
WithCustomDirection = uixt.WithCustomDirection
WithScope = uixt.WithScope // only applicable to ocr actions
WithOffset = uixt.WithOffset
)
var (
WithPerfSystemCPU = gidevice.WithPerfSystemCPU
WithPerfSystemMem = gidevice.WithPerfSystemMem
WithPerfSystemDisk = gidevice.WithPerfSystemDisk
WithPerfSystemNetwork = gidevice.WithPerfSystemNetwork
WithPerfGPU = gidevice.WithPerfGPU
WithPerfFPS = gidevice.WithPerfFPS
WithPerfNetwork = gidevice.WithPerfNetwork
WithPerfBundleID = gidevice.WithPerfBundleID
WithPerfPID = gidevice.WithPerfPID
WithPerfOutputInterval = gidevice.WithPerfOutputInterval
WithPerfProcessAttributes = gidevice.WithPerfProcessAttributes
WithPerfSystemAttributes = gidevice.WithPerfSystemAttributes
)
type StepResult struct {
Name string `json:"name" yaml:"name"` // step name
StepType StepType `json:"step_type" yaml:"step_type"` // step type, testcase/request/transaction/rendezvous