Documentation ¶
Index ¶
- Variables
- func CheckFail(t CanLog, err error)
- func CheckResponseWriter(maynil bool, wResp *httptest.ResponseRecorder, code int, msg string) (respObj g.Resp, err error)
- func GetParams(body map[string]interface{}) (ps string)
- func JsonToFile(interfaces interface{}, fileName string)
- func NewGinContext(method, url string, body []byte, header map[string]string, ...) (*gin.Context, error)
- func NewGinContext2(body interface{}, method, pathAndParam string) (c *gin.Context, w *httptest.ResponseRecorder, err error)
- func NewGinContext3(body string, method, pathAndParam string) (c *gin.Context, w *httptest.ResponseRecorder, err error)
- func NextLogID() string
- type CanLog
- type Case
- type Resp
- func HTTPDo(url, path, method string, body map[string]interface{}, t CanLog) (objBody Resp, err error)
- func HTTPDoWithAuth(header map[string]string, url, path, method, body, username, password string, ...) (objBody Resp, err error)
- func HTTPDoWithCheckErr(header map[string]string, url, path, method, body string, checkErr bool, ...) (objBody Resp, err error)
- func HTTPDoWithHeader(header map[string]string, url, path, method, body string, t CanLog) (objBody Resp, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Env = "57" //test 57 local 71access Service = "ums" //ums os_center sc )
Functions ¶
func CheckResponseWriter ¶
func JsonToFile ¶
func JsonToFile(interfaces interface{}, fileName string)
func NewGinContext ¶
func NewGinContext2 ¶
func NewGinContext3 ¶
Types ¶
type Case ¶
type Case struct { T *testing.T JSONDatas []string Contexs []map[string]interface{} //中间结果 Init func(str string, ctx map[string]interface{}) (ok bool) //初始化函数 Tests []func(str string, ctx map[string]interface{}) (ok bool) //测试函数 Clean func(ctx map[string]interface{}) (ok bool) //清理函数 }
测试用例
Click to show internal directories.
Click to hide internal directories.