Documentation ¶
Overview ¶
Package apitest Usage:
NewAT(xxx). SetParam(xxx). Debug(). Run(). EqualCode(xxx). Result(xxx). Equal(...). WriteFile(xxx). Err()
Index ¶
- Variables
- func CookieMapToSlice(cm map[string]string) []*http.Cookie
- func JSONIndent(w io.Writer, v interface{})
- func OpenFile(file, title string) (*os.File, error)
- type AT
- func (at *AT) Debug() *AT
- func (at *AT) Equal(args ...interface{}) *AT
- func (at *AT) EqualCode(wantCode int) *AT
- func (at *AT) EqualThen(f func(*AT) error, args ...interface{}) *AT
- func (at *AT) Err() error
- func (at *AT) MonkeyRun() *AT
- func (at *AT) New() *AT
- func (at *AT) PressureRun(n, c int) *AT
- func (at *AT) PressureRunBatch(param []PressureParam) *AT
- func (at *AT) Result(r interface{}) *AT
- func (at *AT) Run() *AT
- func (at *AT) SetCookies(cookies []*http.Cookie) *AT
- func (at *AT) SetHeader(header http.Header) *AT
- func (at *AT) SetParam(param interface{}) *AT
- func (at *AT) SetPort(port string) *AT
- func (at *AT) WriteFile(w io.Writer) *AT
- type PressureParam
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNilParam 参数为nil ErrNilParam = errors.New("Please input param, param is nil now") )
Predefined error
Functions ¶
func CookieMapToSlice ¶
CookieMapToSlice map转为slice
Types ¶
Click to show internal directories.
Click to hide internal directories.