Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assert ¶
type Assert struct { Response Response `json:"response" yaml:"response"` OtherAsserts []CommonAssert `json:"otherAsserts" yaml:"otherAsserts"` }
func (*Assert) ResponseDataString ¶
type CaseRequest ¶
type CaseRequest struct { Header map[string]string `json:"header" yaml:"header"` Query url.Values `json:"query" yaml:"query"` Data interface{} `json:"data" yaml:"data"` }
CaseRequest case request data.
func (*CaseRequest) BodyString ¶
func (c *CaseRequest) BodyString() (string, error)
type CaseTask ¶
type CaseTask struct { Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` SetUp []*Command `json:"setup" yaml:"setup"` Mocks []*interact.ImposterMockCase `json:"mocks" yaml:"mocks"` Request *CaseRequest `json:"request" yaml:"request"` Assert *Assert `json:"assert" yaml:"assert"` TearDown []*Command `json:"teardown" yaml:"teardown"` }
CaseTask case level
type CommonAssert ¶
type CommonAssert struct { TypeName string `json:"typeName" yaml:"typeName"` // mysql, redis.. Actual string `json:"actual" yaml:"actual"` // the actual return value of the target. Expected interface{} `json:"expected" yaml:"expected"` // the expected return valueresult. }
func (*CommonAssert) ExpectedString ¶
func (c *CommonAssert) ExpectedString() string
type ItfTask ¶
type ItfTask struct { *TaskInfo SetUp []*Command `json:"setup" yaml:"setUp"` Mocks []*interact.ImposterMockCase `json:"mocks" yaml:"mocks"` TearDown []*Command `json:"teardown" yaml:"teardown"` Cases []*CaseTask `json:"cases" yaml:"cases"` }
ItfTask interface level.
type ItfTaskWithFileInfo ¶
type ItfTaskWithFileInfo struct { Dirpath string `json:"dirpath" yaml:"dirpath"` Filename string `json:"filename" yaml:"filename"` ModifiedTime time.Time `json:"modifiedTime" yaml:"modifiedTime"` *ItfTask }
Record some file information
type TaskInfo ¶
type TaskInfo struct { Protocol Protocol `json:"protocol" yaml:"protocol"` // ServiceName cannot repeat ServiceName string `json:"serviceName" yaml:"serviceName"` // if it's grpc interface, it is always POST ServiceMethod string `json:"serviceMethod" yaml:"serviceMethod"` // POST GET PUT ServiceDescription string `json:"serviceDescription" yaml:"serviceDescription"` // test target // http: "/hello" // grpc: "/examples.greeter.proto.Greeter/Hello" ServicePath string `json:"servicePath" yaml:"servicePath"` // if grpc, need protofile path ServiceProtoFile string `json:"serviceProtoFile" yaml:"servicePath"` }
Click to show internal directories.
Click to hide internal directories.