gardener: github.com/gardener/gardener/test/framework/reporter Index | Files

package reporter

import "github.com/gardener/gardener/test/framework/reporter"

Index

Package Files

esreporter.go

func NewGardenerESReporter Uses

func NewGardenerESReporter(filename, index string) ginkgo.Reporter

NewGardenerESReporter creates a new Gardener elasticsearch reporter. The json bulk will be stored in the passed filename in the given es index.

type ESSpecPhase Uses

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 Uses

func PhaseForState(state ginkgotypes.SpecState) ESSpecPhase

PhaseForState maps ginkgo spec states to internal elasticsearch used phases

type FailureMessage Uses

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 Uses

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 Uses

func (reporter *GardenerESReporter) AfterSuiteDidRun(setupSummary *ginkgotypes.SetupSummary)

AfterSuiteDidRun is implemented as a noop to satisfy the reporter interface for ginkgo.

func (*GardenerESReporter) BeforeSuiteDidRun Uses

func (reporter *GardenerESReporter) BeforeSuiteDidRun(setupSummary *ginkgotypes.SetupSummary)

BeforeSuiteDidRun is implemented as a noop to satisfy the reporter interface for ginkgo.

func (*GardenerESReporter) SpecDidComplete Uses

func (reporter *GardenerESReporter) SpecDidComplete(specSummary *ginkgotypes.SpecSummary)

SpecDidComplete analysis the completed test and creates new es entry

func (*GardenerESReporter) SpecSuiteDidEnd Uses

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 Uses

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 Uses

func (reporter *GardenerESReporter) SpecWillRun(specSummary *ginkgotypes.SpecSummary)

SpecWillRun is implemented as a noop to satisfy the reporter interface for ginkgo.

type TestCase Uses

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 Uses

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.

Package reporter imports 10 packages (graph). Updated 2020-04-09. Refresh now. Tools for package owners.