mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-29 03:57:22 +08:00
change: Runner client
This commit is contained in:
@@ -16,14 +16,14 @@ func NewRunner() *Runner {
|
|||||||
return &Runner{
|
return &Runner{
|
||||||
t: &testing.T{},
|
t: &testing.T{},
|
||||||
debug: false, // default to turn off debug
|
debug: false, // default to turn off debug
|
||||||
Client: req.New(),
|
client: req.New(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type Runner struct {
|
type Runner struct {
|
||||||
t *testing.T
|
t *testing.T
|
||||||
debug bool
|
debug bool
|
||||||
Client *req.Req
|
client *req.Req
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Runner) WithTestingT(t *testing.T) *Runner {
|
func (r *Runner) WithTestingT(t *testing.T) *Runner {
|
||||||
@@ -157,7 +157,7 @@ func (r *Runner) runStepRequest(step *TStep) (stepData *StepData, err error) {
|
|||||||
|
|
||||||
// do request action
|
// do request action
|
||||||
req.Debug = r.debug
|
req.Debug = r.debug
|
||||||
resp, err := r.Client.Do(string(step.Request.Method), step.Request.URL, v...)
|
resp, err := r.client.Do(string(step.Request.Method), step.Request.URL, v...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user