feat #19: integrate sentry for event reporting

This commit is contained in:
debugtalk
2021-11-18 18:14:02 +08:00
parent 4d4ecb1439
commit 05249967f9
8 changed files with 165 additions and 1 deletions
+2
View File
@@ -1,6 +1,7 @@
package cmd
import (
"github.com/getsentry/sentry-go"
"github.com/spf13/cobra"
"github.com/httprunner/hrp"
@@ -16,6 +17,7 @@ var runCmd = &cobra.Command{
$ hrp run examples/ # run testcases in specified folder`,
Args: cobra.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
sentry.CaptureMessage("start to run API tests")
var paths []hrp.ITestCase
for _, arg := range args {
paths = append(paths, &hrp.TestCasePath{Path: arg})