feat: record execution data for report #25

This commit is contained in:
xucong053
2022-01-26 13:38:18 +08:00
parent 82c25e5003
commit 2a81a4a04a
13 changed files with 337 additions and 124 deletions

View File

@@ -27,7 +27,8 @@ var runCmd = &cobra.Command{
}
runner := hrp.NewRunner(nil).
SetDebug(!silentFlag).
SetFailfast(!continueOnFailure)
SetFailfast(!continueOnFailure).
SetSaveTests(saveTests)
if proxyUrl != "" {
runner.SetProxyUrl(proxyUrl)
}
@@ -42,6 +43,7 @@ var (
continueOnFailure bool
silentFlag bool
proxyUrl string
saveTests bool
)
func init() {
@@ -49,5 +51,6 @@ func init() {
runCmd.Flags().BoolVar(&continueOnFailure, "continue-on-failure", false, "continue running next step when failure occurs")
runCmd.Flags().BoolVarP(&silentFlag, "silent", "s", false, "disable logging request & response details")
runCmd.Flags().StringVarP(&proxyUrl, "proxy-url", "p", "", "set proxy url")
runCmd.Flags().BoolVar(&saveTests, "save-tests", false, "save tests summary")
// runCmd.Flags().BoolP("gen-html-report", "r", false, "Generate HTML report")
}