Documentation ¶
Index ¶
- func NewGardenerESReporter(filename, index string) ginkgo.Reporter
- type ESSpecPhase
- type FailureMessage
- type GardenerESReporter
- func (reporter *GardenerESReporter) AfterSuiteDidRun(setupSummary *ginkgotypes.SetupSummary)
- func (reporter *GardenerESReporter) BeforeSuiteDidRun(setupSummary *ginkgotypes.SetupSummary)
- func (reporter *GardenerESReporter) SpecDidComplete(specSummary *ginkgotypes.SpecSummary)
- func (reporter *GardenerESReporter) SpecSuiteDidEnd(summary *ginkgotypes.SuiteSummary)
- func (reporter *GardenerESReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *ginkgotypes.SuiteSummary)
- func (reporter *GardenerESReporter) SpecWillRun(specSummary *ginkgotypes.SpecSummary)
- type TestCase
- type TestSuiteMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGardenerESReporter ¶
NewGardenerESReporter creates a new Gardener elasticsearch reporter. The json bulk will be stored in the passed filename in the given es index.
Types ¶
type ESSpecPhase ¶
type ESSpecPhase string
ESSpecPhase represents the phase of a test
const ( // SpecPhaseUnknown is a test that unknown or skipped SpecPhaseUnknown ESSpecPhase = "Unknown" // SpecPhasePending is a test that is still running SpecPhasePending ESSpecPhase = "Pending" // SpecPhaseSucceeded is a successfully completed test SpecPhaseSucceeded ESSpecPhase = "Succeeded" // SpecPhaseFailed is a failed test SpecPhaseFailed ESSpecPhase = "Failed" // SpecPhaseTimeout is a test which execution time was longer than the specified timeout SpecPhaseTimeout ESSpecPhase = "Timeout" )
func PhaseForState ¶
func PhaseForState(state ginkgotypes.SpecState) ESSpecPhase
PhaseForState maps ginkgo spec states to internal elasticsearch used phases
type FailureMessage ¶
type FailureMessage struct { Type ESSpecPhase `json:"type"` Message string `json:"message"` }
FailureMessage describes the error and the log output if a error occurred.
type GardenerESReporter ¶
type GardenerESReporter struct {
// contains filtered or unexported fields
}
GardenerESReporter is a custom ginkgo exporter for gardener integration tests that write a summary of the tests in a elastic search json report.
func (*GardenerESReporter) AfterSuiteDidRun ¶
func (reporter *GardenerESReporter) AfterSuiteDidRun(setupSummary *ginkgotypes.SetupSummary)
AfterSuiteDidRun is implemented as a noop to satisfy the reporter interface for ginkgo.
func (*GardenerESReporter) BeforeSuiteDidRun ¶
func (reporter *GardenerESReporter) BeforeSuiteDidRun(setupSummary *ginkgotypes.SetupSummary)
BeforeSuiteDidRun is implemented as a noop to satisfy the reporter interface for ginkgo.
func (*GardenerESReporter) SpecDidComplete ¶
func (reporter *GardenerESReporter) SpecDidComplete(specSummary *ginkgotypes.SpecSummary)
SpecDidComplete analysis the completed test and creates new es entry
func (*GardenerESReporter) SpecSuiteDidEnd ¶
func (reporter *GardenerESReporter) SpecSuiteDidEnd(summary *ginkgotypes.SuiteSummary)
SpecSuiteDidEnd collects the metadata for the whole test suite and writes the results as elasticsearch json bulk to the specified location.
func (*GardenerESReporter) SpecSuiteWillBegin ¶
func (reporter *GardenerESReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *ginkgotypes.SuiteSummary)
SpecSuiteWillBegin is the first function that is invoked by ginkgo when a test suites starts. It is used to setup metadata information about the suite
func (*GardenerESReporter) SpecWillRun ¶
func (reporter *GardenerESReporter) SpecWillRun(specSummary *ginkgotypes.SpecSummary)
SpecWillRun is implemented as a noop to satisfy the reporter interface for ginkgo.
type TestCase ¶
type TestCase struct { Metadata *TestSuiteMetadata `json:"suite"` Name string `json:"name"` ShortName string `json:"shortName"` Labels []string `json:"labels,omitempty"` Phase ESSpecPhase `json:"phase"` FailureMessage *FailureMessage `json:"failure,omitempty"` Duration float64 `json:"duration"` SystemOut string `json:"system-out,omitempty"` }
TestCase is one instanace of a test execution
type TestSuiteMetadata ¶
type TestSuiteMetadata struct { Name string `json:"name"` Phase ESSpecPhase `json:"phase"` Tests int `json:"tests"` Failures int `json:"failures"` Errors int `json:"errors"` Duration float64 `json:"duration"` }
TestSuiteMetadata describes the metadata of a whole test suite with all tests.