mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-09 22:44:05 +08:00
fix: append jmespath info when assertion failed
Change-Id: I576aa651086bb2c22343aa69f862955448e1b209
This commit is contained in:
@@ -160,6 +160,7 @@ func (v *responseObject) Validate(validators []Validator, variablesMapping map[s
|
|||||||
}
|
}
|
||||||
v.validationResults = append(v.validationResults, validResult)
|
v.validationResults = append(v.validationResults, validResult)
|
||||||
log.Info().
|
log.Info().
|
||||||
|
Str("jmespath", validator.Check).
|
||||||
Str("assertMethod", assertMethod).
|
Str("assertMethod", assertMethod).
|
||||||
Interface("expectValue", expectValue).
|
Interface("expectValue", expectValue).
|
||||||
Interface("checkValue", checkValue).
|
Interface("checkValue", checkValue).
|
||||||
@@ -168,7 +169,8 @@ func (v *responseObject) Validate(validators []Validator, variablesMapping map[s
|
|||||||
if !result {
|
if !result {
|
||||||
v.t.Fail()
|
v.t.Fail()
|
||||||
return errors.New(fmt.Sprintf(
|
return errors.New(fmt.Sprintf(
|
||||||
"do assertion failed, assertMethod: %v, checkValue: %v, expectValue: %v",
|
"do assertion failed, jmespath: %v, assertMethod: %v, checkValue: %v, expectValue: %v",
|
||||||
|
validator.Check,
|
||||||
assertMethod,
|
assertMethod,
|
||||||
checkValue,
|
checkValue,
|
||||||
expectValue,
|
expectValue,
|
||||||
|
|||||||
Reference in New Issue
Block a user