mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 11:29:48 +08:00
feat: add step start time in step result
This commit is contained in:
@@ -564,8 +564,10 @@ func (r *SessionRunner) Start(givenVars map[string]interface{}) error {
|
||||
}
|
||||
|
||||
// run step
|
||||
stepStartTime := time.Now().Unix()
|
||||
stepResult, err = step.Run(r)
|
||||
stepResult.Name = stepName + loopIndex
|
||||
stepResult.Time = stepStartTime
|
||||
|
||||
r.updateSummary(stepResult)
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ const (
|
||||
|
||||
type StepResult struct {
|
||||
Name string `json:"name" yaml:"name"` // step name
|
||||
Time int64 `json:"time" yaml:"time"` // step time
|
||||
StepType StepType `json:"step_type" yaml:"step_type"` // step type, testcase/request/transaction/rendezvous
|
||||
Success bool `json:"success" yaml:"success"` // step execution result
|
||||
Elapsed int64 `json:"elapsed_ms" yaml:"elapsed_ms"` // step execution time in millisecond(ms)
|
||||
|
||||
Reference in New Issue
Block a user