mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
feat: log action params in summary
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v5.0.0+2411141743
|
v5.0.0+2411142009
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
package hrp
|
package hrp
|
||||||
|
|
||||||
|
import "github.com/httprunner/httprunner/v4/hrp/pkg/uixt"
|
||||||
|
|
||||||
type StepType string
|
type StepType string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -49,7 +51,7 @@ type TStep struct {
|
|||||||
|
|
||||||
// one step contains one or multiple actions
|
// one step contains one or multiple actions
|
||||||
type ActionResult struct {
|
type ActionResult struct {
|
||||||
Name string `json:"name"` // action name
|
uixt.MobileAction `json:",inline"`
|
||||||
StartTime int64 `json:"start_time"` // action start time
|
StartTime int64 `json:"start_time"` // action start time
|
||||||
Elapsed int64 `json:"elapsed_ms"` // action elapsed time(ms)
|
Elapsed int64 `json:"elapsed_ms"` // action elapsed time(ms)
|
||||||
Error error `json:"error"` // action execution result
|
Error error `json:"error"` // action execution result
|
||||||
|
|||||||
@@ -714,7 +714,7 @@ func runStepMobileUI(s *SessionRunner, step IStep) (stepResult *StepResult, err
|
|||||||
default:
|
default:
|
||||||
actionStartTime := time.Now()
|
actionStartTime := time.Now()
|
||||||
actionResult := &ActionResult{
|
actionResult := &ActionResult{
|
||||||
Name: string(action.Method),
|
MobileAction: action,
|
||||||
StartTime: actionStartTime.Unix(), // action 开始时间
|
StartTime: actionStartTime.Unix(), // action 开始时间
|
||||||
}
|
}
|
||||||
if action.Params, err = s.caseRunner.parser.Parse(action.Params, stepVariables); err != nil {
|
if action.Params, err = s.caseRunner.parser.Parse(action.Params, stepVariables); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user