change: move step logs to session runner

This commit is contained in:
debugtalk
2022-03-31 12:20:40 +08:00
parent 78c272ef29
commit dff1255b94
7 changed files with 32 additions and 38 deletions
+7 -7
View File
@@ -173,13 +173,13 @@ func (v *responseObject) Validate(iValidators []interface{}, variablesMapping ma
Msgf("validate %s", checkItem)
if !result {
v.t.Fail()
return errors.New(fmt.Sprintf(
"do assertion failed, checkExpr: %v, assertMethod: %v, checkValue: %v, expectValue: %v",
validator.Check,
assertMethod,
checkValue,
expectValue,
))
log.Error().
Str("checkExpr", validator.Check).
Str("assertMethod", assertMethod).
Interface("checkValue", checkValue).
Interface("expectValue", expectValue).
Msg("assert failed")
return errors.New("step validation failed")
}
}
return nil