mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-17 10:37:35 +08:00
feat: add status code for mobile UI
This commit is contained in:
@@ -18,17 +18,33 @@ var (
|
||||
)
|
||||
|
||||
// parser: [40, 60)
|
||||
var (
|
||||
ParseError = errors.New("parse error") // 40
|
||||
ParseConfigError = errors.New("parse config error") // 41
|
||||
ParseStringError = errors.New("parse string failed") // 42
|
||||
ParseVariablesError = errors.New("parse variables failed") // 43
|
||||
)
|
||||
|
||||
// runner: [60, 100)
|
||||
|
||||
// ios related: [100, 130)
|
||||
var (
|
||||
IOSScreenShotError = errors.New("ios screenshot error") // 110
|
||||
IOSDeviceConnectionError = errors.New("ios device connection error") // 100
|
||||
IOSDeviceHTTPDriverError = errors.New("ios device HTTP driver error") // 101
|
||||
IOSDeviceUSBDriverError = errors.New("ios device USB driver error") // 102
|
||||
IOSScreenShotError = errors.New("ios screenshot error") // 110
|
||||
IOSCaptureLogError = errors.New("ios capture log error") // 111
|
||||
|
||||
MobileUIDriverError = errors.New("mobile UI driver error") // 120
|
||||
MobileUIValidationError = errors.New("mobile UI validation error") // 121
|
||||
)
|
||||
|
||||
// android related: [130, 160)
|
||||
var (
|
||||
AndroidScreenShotError = errors.New("android screenshot error") // 150
|
||||
AndroidDeviceConnectionError = errors.New("android device connection error") // 130
|
||||
AndroidDeviceDriverError = errors.New("android device driver error") // 131
|
||||
AndroidScreenShotError = errors.New("android screenshot error") // 150
|
||||
AndroidCaptureLogError = errors.New("android capture log error") // 151
|
||||
)
|
||||
|
||||
// OCR related: [160, 180)
|
||||
@@ -45,14 +61,28 @@ var (
|
||||
// report related: [200, 220)
|
||||
|
||||
var errorsMap = map[error]int{
|
||||
// loader
|
||||
LoadJSONError: 10,
|
||||
LoadYAMLError: 11,
|
||||
|
||||
// parser
|
||||
ParseError: 40,
|
||||
ParseConfigError: 41,
|
||||
ParseStringError: 42,
|
||||
ParseVariablesError: 43,
|
||||
|
||||
// ios related
|
||||
IOSScreenShotError: 110,
|
||||
IOSDeviceConnectionError: 100,
|
||||
IOSDeviceHTTPDriverError: 101,
|
||||
IOSDeviceUSBDriverError: 102,
|
||||
IOSScreenShotError: 110,
|
||||
IOSCaptureLogError: 111,
|
||||
|
||||
// android related
|
||||
AndroidScreenShotError: 130,
|
||||
AndroidDeviceConnectionError: 130,
|
||||
AndroidDeviceDriverError: 131,
|
||||
AndroidScreenShotError: 150,
|
||||
AndroidCaptureLogError: 151,
|
||||
|
||||
// OCR related
|
||||
OCREnvMissedError: 160,
|
||||
|
||||
Reference in New Issue
Block a user