Documentation
¶
Overview ¶
Package testing provide the test case functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clean ¶
type Clean struct {
CleanPrepare bool `yaml:"cleanPrepare"`
}
Clean represents the clean work after testing
type Prepare ¶
type Prepare struct {
Kubernetes []string `yaml:"kubernetes"`
}
Prepare does the prepare work
type Request ¶
type Request struct { API string `yaml:"api"` Method string `yaml:"method"` Query map[string]string `yaml:"query"` Header map[string]string `yaml:"header"` Form map[string]string `yaml:"form"` Body string `yaml:"body"` BodyFromFile string `yaml:"bodyFromFile"` }
Request represents a HTTP request
type Response ¶
type Response struct { StatusCode int `yaml:"statusCode"` Body string `yaml:"body"` Header map[string]string `yaml:"header"` BodyFieldsExpect map[string]interface{} `yaml:"bodyFieldsExpect"` Verify []string `yaml:"verify"` }
Response is the expected response
type TestCase ¶
type TestCase struct { Name string Group string Prepare Prepare `yaml:"prepare"` Request Request `yaml:"request"` Expect Response `yaml:"expect"` Clean Clean `yaml:"clean"` }
TestCase represents a test case
func ParseTestCaseFromData ¶ added in v0.0.5
ParseTestCaseFromData parses the data to a test case
type TestSuite ¶ added in v0.0.2
type TestSuite struct { Name string `yaml:"name"` API string `yaml:"api"` Items []TestCase `yaml:"items"` }
TestSuite represents a set of test cases
func ParseFromData ¶ added in v0.0.5
ParseFromData parses data and returns the test suite
Click to show internal directories.
Click to hide internal directories.