fix: parse error exit code

This commit is contained in:
debugtalk
2022-10-24 15:25:09 +08:00
parent e3912f219d
commit 8c359e3610
29 changed files with 60 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
# Release History
## v4.3.0 (2022-10-23)
## v4.3.0 (2022-10-24)
Release hrp sub package `uixt` to support iOS/Android UI automation 🎉
@@ -10,7 +10,7 @@ Release hrp sub package `uixt` to support iOS/Android UI automation 🎉
For iOS/Android device management:
- feat: integrage ios device management with [gidevice],
- feat: integrage ios device management with [gidevice]
- feat: integrage android device management with [gadb]
- feat: add simple commands to interact with iOS/Android devices, try `hrp ios` and `hrp adb`

View File

@@ -1 +1 @@
v4.3.0
v4.3.0-10241627

View File

@@ -8,4 +8,4 @@ import (
var VERSION string
// httprunner python version
const HttpRunnerMinimumVersion = "v4.2.0"
const HttpRunnerMinimumVersion = "v4.3.0"

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gadb
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gadb
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gadb
import (

View File

@@ -1 +0,0 @@
/.idea

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package ipa
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package nskeyedarchiver
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package nskeyedarchiver
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package nskeyedarchiver
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package nskeyedarchiver
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package nskeyedarchiver
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package nskeyedarchiver
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import "testing"

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import (

View File

@@ -1,3 +1,5 @@
//go:build localtest
package gidevice
import (

View File

@@ -398,6 +398,8 @@ func (dev *IOSDevice) NewHTTPDriver(capabilities Capabilities) (driver WebDriver
return nil, errors.Wrap(code.IOSDeviceHTTPDriverError,
fmt.Sprintf("forward tcp port failed: %v", err))
}
} else {
log.Info().Int("WDA_LOCAL_PORT", localPort).Msg("reuse WDA local port")
}
var localMjpegPort int
@@ -412,6 +414,9 @@ func (dev *IOSDevice) NewHTTPDriver(capabilities Capabilities) (driver WebDriver
return nil, errors.Wrap(code.IOSDeviceHTTPDriverError,
fmt.Sprintf("forward tcp port failed: %v", err))
}
} else {
log.Info().Int("WDA_LOCAL_MJPEG_PORT", localMjpegPort).
Msg("reuse WDA local mjpeg port")
}
log.Info().Interface("capabilities", capabilities).

View File

@@ -613,8 +613,11 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err
// run actions
for _, action := range actions {
if action.Params, err = s.caseRunner.parser.Parse(action.Params, stepVariables); err != nil {
return stepResult, errors.Wrap(code.ParseError,
fmt.Sprintf("parse action params failed: %v", err))
if !code.IsErrorPredefined(err) {
err = errors.Wrap(code.ParseError,
fmt.Sprintf("parse action params failed: %v", err))
}
return stepResult, err
}
if err := uiDriver.DoAction(action); err != nil {
if !code.IsErrorPredefined(err) {