Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "run", Short: "Run Tests", PreRun: func(cmd *cobra.Command, args []string) { if len(args) == 0 { path = append(path, ".") } else { path = args[0:] } venom.RegisterExecutor(exec.Name, exec.New()) venom.RegisterExecutor(http.Name, http.New()) venom.RegisterExecutor(imap.Name, imap.New()) venom.RegisterExecutor(readfile.Name, readfile.New()) venom.RegisterExecutor(smtp.Name, smtp.New()) venom.RegisterExecutor(ssh.Name, ssh.New()) venom.RegisterExecutor(web.Name, web.New()) venom.RegisterTestCaseContext(defaultctx.Name, defaultctx.New()) venom.RegisterTestCaseContext(webctx.Name, webctx.New()) }, Run: func(cmd *cobra.Command, args []string) { if parallel < 0 { parallel = 1 } mapvars := make(map[string]string) if withEnv { variables = append(variables, os.Environ()...) } for _, a := range variables { t := strings.SplitN(a, "=", 2) if len(t) < 2 { continue } mapvars[t[0]] = strings.Join(t[1:], "") } start := time.Now() tests, err := venom.Process(path, mapvars, exclude, parallel, logLevel, detailsLevel, os.Stdout) if err != nil { log.Fatal(err) } elapsed := time.Since(start) if err := venom.OutputResult(format, resume, resumeFailures, outputDir, *tests, elapsed, detailsLevel); err != nil { fmt.Fprintf(os.Stderr, err.Error()) os.Exit(1) } }, }
Cmd run
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.