Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Expect ¶
type Expect struct { StatusCode int `json:"statusCode,omitempty"` Header testsuite.Header `json:"header,omitempty"` Document interface{} `json:"document,omitempty"` // Exact document to match. Exclusive with JSONSchema. JSONSchema map[string]interface{} `json:"jsonSchema,omitempty"` // Exact JSON schema to match. Exclusive with Document. JSONValues map[string]interface{} `json:"jsonValues,omitempty"` // Required JSON values. Optional, if JSONSchema is set. }
type Request ¶
type Request struct { URL string `json:"url,omitempty"` // If set, will overwrite the base URL. Path string `json:"path,omitempty"` Method string `json:"method,omitempty"` Header testsuite.Header `json:"header,omitempty"` // Only one of the three following must be set. Body interface{} `json:"body,omitempty"` Multipart map[string]string `json:"multipart,omitempty"` FormData map[string]string `json:"formData,omitempty"` }
type Suite ¶
type Suite struct {
// contains filtered or unexported fields
}
Suite describes an HTTP test suite.
type Test ¶
type Test struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` // Name used to identify this test. Request Request `json:"request,omitempty"` // Request describes the HTTP request. Expect Expect `json:"expect,omitempty"` // Expect describes the expected result of the HTTP request. SaveDocument bool `json:"saveDocument,omitempty"` }
Click to show internal directories.
Click to hide internal directories.