reporter

package
v1.90.8 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReportResults added in v1.42.0

func ReportResults(filename, index string, report ginkgo.Report)

ReportResults implements reporting based on the ginkgo v2 Report type while maintaining the existing structure of the elastic index. ReportsResults is intended to be called once in an ReportAfterSuite node.

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"
	// SpecPhaseInterrupted is a test which execution time was longer than the specified timeout
	SpecPhaseInterrupted ESSpecPhase = "Interrupted"
)

func PhaseForState

func PhaseForState(state types.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 an 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 an elastic search json report.

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 instance 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.

Jump to

Keyboard shortcuts

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