mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-12 03:09:43 +08:00
change: remove session data success
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v5.0.0+2411191057
|
v5.0.0+2411192052
|
||||||
|
|||||||
@@ -427,7 +427,6 @@ func runStepRequest(r *SessionRunner, step IStep) (stepResult *StepResult, err e
|
|||||||
err = respObj.Validate(stepRequest.Validators, stepRequest.Variables)
|
err = respObj.Validate(stepRequest.Validators, stepRequest.Variables)
|
||||||
sessionData.Validators = respObj.validationResults
|
sessionData.Validators = respObj.validationResults
|
||||||
if err == nil {
|
if err == nil {
|
||||||
sessionData.Success = true
|
|
||||||
stepResult.Success = true
|
stepResult.Success = true
|
||||||
}
|
}
|
||||||
stepResult.ContentSize = resp.ContentLength
|
stepResult.ContentSize = resp.ContentLength
|
||||||
|
|||||||
@@ -433,13 +433,11 @@ func runStepWebSocket(r *SessionRunner, step IStep) (stepResult *StepResult, err
|
|||||||
err = respObj.Validate(stepWebSocket.Validators, variables)
|
err = respObj.Validate(stepWebSocket.Validators, variables)
|
||||||
sessionData.Validators = respObj.validationResults
|
sessionData.Validators = respObj.validationResults
|
||||||
if err == nil {
|
if err == nil {
|
||||||
sessionData.Success = true
|
|
||||||
stepResult.Success = true
|
stepResult.Success = true
|
||||||
}
|
}
|
||||||
stepResult.ContentSize = getContentSize(resp)
|
stepResult.ContentSize = getContentSize(resp)
|
||||||
stepResult.Data = sessionData
|
stepResult.Data = sessionData
|
||||||
} else {
|
} else {
|
||||||
sessionData.Success = true
|
|
||||||
stepResult.Success = true
|
stepResult.Success = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -229,13 +229,11 @@ type TestCaseInOut struct {
|
|||||||
|
|
||||||
func newSessionData() *SessionData {
|
func newSessionData() *SessionData {
|
||||||
return &SessionData{
|
return &SessionData{
|
||||||
Success: false,
|
|
||||||
ReqResps: &ReqResps{},
|
ReqResps: &ReqResps{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type SessionData struct {
|
type SessionData struct {
|
||||||
Success bool `json:"success" yaml:"success"`
|
|
||||||
ReqResps *ReqResps `json:"req_resps" yaml:"req_resps"`
|
ReqResps *ReqResps `json:"req_resps" yaml:"req_resps"`
|
||||||
Address *Address `json:"address,omitempty" yaml:"address,omitempty"` // TODO
|
Address *Address `json:"address,omitempty" yaml:"address,omitempty"` // TODO
|
||||||
Validators []*ValidationResult `json:"validators,omitempty" yaml:"validators,omitempty"`
|
Validators []*ValidationResult `json:"validators,omitempty" yaml:"validators,omitempty"`
|
||||||
|
|||||||
Reference in New Issue
Block a user