report

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XmlProcessingInstruction = `<?xml version="1.0" encoding="UTF-8"?>`
)

Variables

This section is empty.

Functions

func AppendTestResults

func AppendTestResults(results *v1alpha1.TestResults, result v1alpha1.TestResults)

func CleanReports

func CleanReports() error

func GenerateReport

func GenerateReport(results *v1alpha1.TestResults, output OutputFormat) (string, error)

func GetSummaryReport

func GetSummaryReport(results *v1alpha1.TestResults) string

func LoadTestResults

func LoadTestResults() (*v1alpha1.TestResults, error)

func PrintSummaryReport

func PrintSummaryReport(results *v1alpha1.TestResults)

func SaveTestResults

func SaveTestResults(test *v1alpha1.Test) error

Types

type Failure

type Failure struct {
	XMLName    xml.Name `xml:"failure,omitempty"`
	Message    string   `xml:"message,attr,omitempty"`
	Type       string   `xml:"type,attr,omitempty"`
	Stacktrace string   `xml:",chardata"`
}

type JUnitReport

type JUnitReport struct {
	Suite TestSuite `xml:"testsuite"`
}

type OutputFormat

type OutputFormat string
const (
	OutputDir = "_output"

	DefaultOutput OutputFormat = ""
	JsonOutput    OutputFormat = "json"
	JUnitOutput   OutputFormat = "junit"
	SummaryOutput OutputFormat = "summary"
)

func (*OutputFormat) Set

func (d *OutputFormat) Set(s string) error

Set implements pflag/flag.Value

func (*OutputFormat) String

func (d *OutputFormat) String() string

Type implements pflag/flag.Value

func (*OutputFormat) Type

func (d *OutputFormat) Type() string

Type implements pflag.Value

type TestCase

type TestCase struct {
	Name      string  `xml:"name,attr"`
	ClassName string  `xml:"classname,attr"`
	Time      float32 `xml:"time,attr"`
	SystemOut string  `xml:"system-out,omitempty"`
	Failure   *Failure
}

type TestSuite

type TestSuite struct {
	Name     string     `xml:"name,attr"`
	Errors   int        `xml:"errors,attr"`
	Failures int        `xml:"failures,attr"`
	Skipped  int        `xml:"skipped,attr"`
	Tests    int        `xml:"tests,attr"`
	Time     float32    `xml:"time,attr"`
	TestCase []TestCase `xml:"testcase"`
}

Jump to

Keyboard shortcuts

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