reporters

package
v1.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProgressReporter

type ProgressReporter struct {
	LastMsg string `json:"msg"`

	TestsTotal     int `json:"total"`
	TestsCompleted int `json:"completed"`
	TestsSkipped   int `json:"skipped"`
	TestsFailed    int `json:"failed"`

	Failures []string `json:"failures,omitempty"`
	// contains filtered or unexported fields
}

One known limitation of the ProgressReporter it this reporter will not consolidate the reporter from each sub-process if the tests are run in parallel. As what's observed the reporter sent before test suite is started will be assembled correctly but each process will report on its own after each test or suite are completed. Here is a sample report that 5 testcases are executed totally, and run in parallel with 3 procs, 3 of them are failed and other 2 passed. {"msg":"","total":5,"completed":0,"skipped":0,"failed":0} {"msg":"Test Suite starting","total":5,"completed":0,"skipped":0,"failed":0} {"msg":"FAILED [sig-node] NoExecuteTaintManager Single Pod doesn't evict pod with tolerations from tainted nodes","total":0,"completed":0,"skipped":1332,"failed":1,"failures":["[sig-node] NoExecuteTaintManager..."]} {"msg":"FAILED [sig-node] NoExecuteTaintManager Single Pod evicts pods from tainted nodes","total":5,"completed":0,"skipped":2524,"failed":1,"failures":["[sig-node] NoExecuteTaintManager Single Pod evicts pods from tainted nodes"]} {"msg":"PASSED [sig-node] NoExecuteTaintManager Single Pod removing taint cancels eviction [Disruptive] [Conformance]","total":0,"completed":1,"skipped":1181,"failed":0} {"msg":"Test Suite completed","total":0,"completed":1,"skipped":2592,"failed":0} {"msg":"PASSED [sig-node] NoExecuteTaintManager Single Pod eventually evict pod with finite tolerations from tainted nodes","total":0,"completed":1,"skipped":1399,"failed":1,"failures":["[sig-node] NoExecuteTaintManager..."]} {"msg":"Test Suite completed","total":0,"completed":1,"skipped":1399,"failed":1,"failures":["[sig-node] NoExecuteTaintManager Single Pod doesn't evict pod with tolerations from tainted nodes"]} {"msg":"FAILED [sig-node] NoExecuteTaintManager Single Pod pods evicted from tainted nodes...","total":5,"completed":0,"skipped":3076,"failed":2,"failures":["[sig-node] NoExecuteTaintManager...","[sig-node] NoExecuteTaintManager..."]} {"msg":"Test Suite completed","total":5,"completed":0,"skipped":3076,"failed":2,"failures":["[sig-node] NoExecuteTaintManager Single Pod evicts pods from tainted nodes","[sig-node] NoExecuteTaintManager..."]}

func NewProgressReporter

func NewProgressReporter(progressReportURL string) *ProgressReporter

NewProgressReporter returns a progress reporter which posts updates to the given URL.

func (*ProgressReporter) ProcessSpecReport added in v1.25.0

func (reporter *ProgressReporter) ProcessSpecReport(report ginkgo.SpecReport)

ProcessSpecReport summarizes the report state and sends the state to the configured endpoint if set.

func (*ProgressReporter) SendUpdates added in v1.25.0

func (reporter *ProgressReporter) SendUpdates()

SendUpdates serializes the current progress and posts it to the configured endpoint if set. It does not print to stdout because that interferes with progress reporting by Ginko and (when Ginkgo does output redirection) doesn't actually appear on the screen anyway.

func (*ProgressReporter) SetEndMsg added in v1.25.0

func (reporter *ProgressReporter) SetEndMsg()

func (*ProgressReporter) SetStartMsg added in v1.25.0

func (reporter *ProgressReporter) SetStartMsg()

func (*ProgressReporter) SetTestsTotal added in v1.27.0

func (reporter *ProgressReporter) SetTestsTotal(totalSpec int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL