MCPcopy
hub / github.com/httprunner/httprunner / Output

Interface Output

hrp/pkg/boomer/output.go:29–39  ·  view source on GitHub ↗

Output is primarily responsible for printing test results to different destinations such as consoles, files. You can write you own output and add to boomer. When running in standalone mode, the default output is ConsoleOutput, you can add more. When running in distribute mode, test results will be r

Source from the content-addressed store, hash-verified

27// All the OnXXX function will be call in a separated goroutine, just in case some output will block.
28// But it will wait for all outputs return to avoid data lost.
29type Output interface {
30 // OnStart will be call before the test starts.
31 OnStart()
32
33 // By default, each output receive stats data from runner every three seconds.
34 // OnEvent is responsible for dealing with the data.
35 OnEvent(data map[string]interface{})
36
37 // OnStop will be called before the test ends.
38 OnStop()
39}
40
41// ConsoleOutput is the default output for standalone mode.
42type ConsoleOutput struct{}

Callers 3

outputOnStartMethod · 0.65
outputOnEventMethod · 0.65
outputOnStopMethod · 0.65

Implementers 3

ConsoleOutputhrp/pkg/boomer/output.go
PrometheusPusherOutputhrp/pkg/boomer/output.go
HitOutputhrp/pkg/boomer/runner_test.go

Calls

no outgoing calls

Tested by

no test coverage detected