mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-26 02:40:05 +08:00
feat: validate response object
This commit is contained in:
12
validate.go
12
validate.go
@@ -1,6 +1,8 @@
|
||||
package httpboomer
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// implements IStep interface
|
||||
type stepRequestValidation struct {
|
||||
@@ -9,10 +11,10 @@ type stepRequestValidation struct {
|
||||
|
||||
func (s *stepRequestValidation) AssertEqual(jmesPath string, expected interface{}, msg string) *stepRequestValidation {
|
||||
validator := TValidator{
|
||||
Check: jmesPath,
|
||||
Comparator: "equals",
|
||||
Expect: expected,
|
||||
Message: msg,
|
||||
Check: jmesPath,
|
||||
Assert: "equals",
|
||||
Expect: expected,
|
||||
Message: msg,
|
||||
}
|
||||
s.step.Validators = append(s.step.Validators, validator)
|
||||
return s
|
||||
|
||||
Reference in New Issue
Block a user