mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-03 06:49:38 +08:00
fix: typo
change: do not add console output by default feat: add GA for docs refactor: move builtin to internal refactor: relocate sentry sdk feat: report events with ga change: use http client session fix: report GA events change: sentry
This commit is contained in:
11
runner.go
11
runner.go
@@ -16,6 +16,8 @@ import (
|
||||
|
||||
"github.com/jinzhu/copier"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/httprunner/hrp/internal/ga"
|
||||
)
|
||||
|
||||
// run API test with default configs
|
||||
@@ -69,6 +71,15 @@ func (r *Runner) SetProxyUrl(proxyUrl string) *Runner {
|
||||
}
|
||||
|
||||
func (r *Runner) Run(testcases ...ITestCase) error {
|
||||
event := ga.EventTracking{
|
||||
Category: "RunAPITests",
|
||||
Action: "hrp run",
|
||||
}
|
||||
// report start event
|
||||
go ga.SendEvent(event)
|
||||
// report execution timing event
|
||||
defer ga.SendEvent(event.StartTiming("execution"))
|
||||
|
||||
for _, iTestCase := range testcases {
|
||||
testcase, err := iTestCase.ToTestCase()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user