outputs

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatOptions added in v0.3.6

func FormatOptions() []string

FormatOptions returns a sorted list of all the valid options that outputers accept

func IsValidFormat added in v0.3.21

func IsValidFormat(f string) bool

IsValidFormat determines if f is a valid format name based on Outputers()

func Outputers added in v0.0.5

func Outputers() []string

Outputers returns a sorted list of the names of the registered outputers.

func RegisterOutputer added in v0.0.5

func RegisterOutputer(name string, outputer Outputer)

Types

type Documentation added in v0.0.5

type Documentation struct{}

func (Documentation) Output added in v0.0.5

func (r Documentation) Output(w io.Writer, results <-chan []resource.TestResult,
	outConfig util.OutputConfig) (exitCode int)

func (Documentation) ValidOptions added in v0.3.21

func (r Documentation) ValidOptions() []*formatOption

type JUnit added in v0.1.2

type JUnit struct{}

func (JUnit) Output added in v0.1.2

func (r JUnit) Output(w io.Writer, results <-chan []resource.TestResult,
	outConfig util.OutputConfig) (exitCode int)

func (JUnit) ValidOptions added in v0.3.21

func (r JUnit) ValidOptions() []*formatOption

type Json added in v0.0.7

type Json struct{}

func (Json) Output added in v0.0.7

func (r Json) Output(w io.Writer, results <-chan []resource.TestResult,
	outConfig util.OutputConfig) (exitCode int)

func (Json) ValidOptions added in v0.3.21

func (r Json) ValidOptions() []*formatOption

type Nagios added in v0.0.12

type Nagios struct{}

func (Nagios) Output added in v0.0.12

func (r Nagios) Output(w io.Writer, results <-chan []resource.TestResult,
	outConfig util.OutputConfig) (exitCode int)

func (Nagios) ValidOptions added in v0.3.21

func (r Nagios) ValidOptions() []*formatOption

type Outputer

type Outputer interface {
	Output(io.Writer, <-chan []resource.TestResult, util.OutputConfig) int
	ValidOptions() []*formatOption
}

func GetOutputer added in v0.0.5

func GetOutputer(name string) (Outputer, error)

type Prometheus added in v0.3.21

type Prometheus struct{}

Prometheus renders metrics in prometheus.io text-format https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format

func (Prometheus) Output added in v0.3.21

func (r Prometheus) Output(w io.Writer, results <-chan []resource.TestResult,
	outConfig util.OutputConfig) (exitCode int)

Output converts the results into the prometheus text-format.

func (Prometheus) ValidOptions added in v0.3.21

func (r Prometheus) ValidOptions() []*formatOption

ValidOptions is a list of valid format options for prometheus

type Rspecish

type Rspecish struct{}

func (Rspecish) Output

func (r Rspecish) Output(w io.Writer, results <-chan []resource.TestResult,
	outConfig util.OutputConfig) (exitCode int)

func (Rspecish) ValidOptions added in v0.3.21

func (r Rspecish) ValidOptions() []*formatOption

type Silent added in v0.3.2

type Silent struct{}

func (Silent) Output added in v0.3.2

func (r Silent) Output(w io.Writer, results <-chan []resource.TestResult,
	outConfig util.OutputConfig) (exitCode int)

func (Silent) ValidOptions added in v0.3.21

func (r Silent) ValidOptions() []*formatOption

type StructureTestSummary added in v0.3.21

type StructureTestSummary struct {
	TestCount     int           `json:"test-count"`
	Failed        int           `json:"failed-count"`
	TotalDuration time.Duration `json:"total-duration"`
}

StructureTestSummary holds summary information about a test run

func (*StructureTestSummary) String added in v0.3.21

func (s *StructureTestSummary) String() string

String represents human friendly representation of the test summary

type Structured added in v0.3.21

type Structured struct{}

Structured is a output formatter that logs into a StructuredOutput structure

func (Structured) Output added in v0.3.21

func (r Structured) Output(w io.Writer, results <-chan []resource.TestResult, outConfig util.OutputConfig) (exitCode int)

Output processes output from tests into StructuredOutput written to w as a string

func (Structured) ValidOptions added in v0.3.21

func (r Structured) ValidOptions() []*formatOption

type StructuredOutput added in v0.3.21

type StructuredOutput struct {
	Results     []StructuredTestResult `json:"results"`
	Summary     StructureTestSummary   `json:"summary"`
	SummaryLine string                 `json:"summary-line"`
}

StructuredOutput is the full output structure for the structured output format

type StructuredTestResult added in v0.3.21

type StructuredTestResult struct {
	resource.TestResult
	SummaryLine        string `json:"summary-line"`
	SummaryLineCompact string `json:"summary-line-compact"`
}

StructuredTestResult is an individual test result with additional human friendly summary

type Tap added in v0.1.2

type Tap struct{}

func (Tap) Output added in v0.1.2

func (r Tap) Output(w io.Writer, results <-chan []resource.TestResult,
	outConfig util.OutputConfig) (exitCode int)

func (Tap) ValidOptions added in v0.3.21

func (r Tap) ValidOptions() []*formatOption

Jump to

Keyboard shortcuts

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