mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-11 10:49:43 +08:00
change: add examples
This commit is contained in:
@@ -89,7 +89,8 @@ func (v *ResponseObject) Extract(extractors map[string]string) map[string]interf
|
||||
extractMapping := make(map[string]interface{})
|
||||
for key, value := range extractors {
|
||||
extractedValue := v.searchJmespath(value)
|
||||
log.Printf("extract %s => %v", value, extractedValue)
|
||||
log.Printf("[extract] %s => %v", value, extractedValue)
|
||||
log.Printf("[setVariable] %s = %v", key, extractedValue)
|
||||
extractMapping[key] = extractedValue
|
||||
}
|
||||
|
||||
@@ -117,7 +118,7 @@ func (v *ResponseObject) Validate(validators []TValidator, variablesMapping map[
|
||||
|
||||
// do assertion
|
||||
result := assertFunc(v.t, expectValue, checkValue)
|
||||
log.Printf("assert %s %s %v => %v", checkItem, assertMethod, expectValue, result)
|
||||
log.Printf("[assert] %s <%s> %v => %v", checkItem, assertMethod, expectValue, result)
|
||||
if !result {
|
||||
v.t.Fail()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user