mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-08 00:47:36 +08:00
change: remove unused session data in step result
This commit is contained in:
@@ -1 +1 @@
|
||||
v5.0.0+2411192052
|
||||
v5.0.0+2411192100
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ type StepResult struct {
|
||||
Elapsed int64 `json:"elapsed_ms" yaml:"elapsed_ms"` // step execution time in millisecond(ms)
|
||||
HttpStat map[string]int64 `json:"httpstat,omitempty" yaml:"httpstat,omitempty"` // httpstat in millisecond(ms)
|
||||
Data interface{} `json:"data,omitempty" yaml:"data,omitempty"` // step data
|
||||
ContentSize int64 `json:"content_size" yaml:"content_size"` // response body length
|
||||
ContentSize int64 `json:"content_size,omitempty" yaml:"content_size,omitempty"` // response body length
|
||||
ExportVars map[string]interface{} `json:"export_vars,omitempty" yaml:"export_vars,omitempty"` // extract variables
|
||||
Actions []*ActionResult `json:"actions,omitempty" yaml:"actions,omitempty"` // store action execution info
|
||||
Attachments interface{} `json:"attachments,omitempty" yaml:"attachments,omitempty"` // store extra step information, such as error message or screenshots
|
||||
|
||||
@@ -753,9 +753,12 @@ func runStepMobileUI(s *SessionRunner, step IStep) (stepResult *StepResult, err
|
||||
}
|
||||
return
|
||||
}
|
||||
sessionData := newSessionData()
|
||||
sessionData.Validators = validateResults
|
||||
if len(validateResults) > 0 {
|
||||
sessionData := &SessionData{
|
||||
Validators: validateResults,
|
||||
}
|
||||
stepResult.Data = sessionData
|
||||
}
|
||||
stepResult.Success = true
|
||||
return stepResult, nil
|
||||
}
|
||||
|
||||
+3
-1
@@ -301,7 +301,9 @@ func runStepRequest(r *SessionRunner, step IStep) (stepResult *StepResult, err e
|
||||
return
|
||||
}
|
||||
|
||||
sessionData := newSessionData()
|
||||
sessionData := &SessionData{
|
||||
ReqResps: &ReqResps{},
|
||||
}
|
||||
parser := r.caseRunner.parser
|
||||
config := r.caseRunner.Config.Get()
|
||||
|
||||
|
||||
@@ -290,7 +290,9 @@ func runStepWebSocket(r *SessionRunner, step IStep) (stepResult *StepResult, err
|
||||
stepResult.Elapsed = time.Since(start).Milliseconds()
|
||||
}()
|
||||
|
||||
sessionData := newSessionData()
|
||||
sessionData := &SessionData{
|
||||
ReqResps: &ReqResps{},
|
||||
}
|
||||
parser := r.caseRunner.parser
|
||||
config := r.caseRunner.Config.Get()
|
||||
|
||||
|
||||
@@ -227,12 +227,6 @@ type TestCaseInOut struct {
|
||||
ExportVars map[string]interface{} `json:"export_vars" yaml:"export_vars"`
|
||||
}
|
||||
|
||||
func newSessionData() *SessionData {
|
||||
return &SessionData{
|
||||
ReqResps: &ReqResps{},
|
||||
}
|
||||
}
|
||||
|
||||
type SessionData struct {
|
||||
ReqResps *ReqResps `json:"req_resps" yaml:"req_resps"`
|
||||
Address *Address `json:"address,omitempty" yaml:"address,omitempty"` // TODO
|
||||
|
||||
Reference in New Issue
Block a user