reporters

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 10 Imported by: 839

Documentation

Overview

Ginkgo's Default Reporter

A number of command line flags are available to tweak Ginkgo's default output.

These are documented [here](http://onsi.github.io/ginkgo/#running_tests)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultReporter

type DefaultReporter struct {
	// contains filtered or unexported fields
}

func NewDefaultReporter

func NewDefaultReporter(config config.DefaultReporterConfigType, stenographer stenographer.Stenographer) *DefaultReporter

func (*DefaultReporter) AfterSuiteDidRun

func (reporter *DefaultReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary)

func (*DefaultReporter) BeforeSuiteDidRun

func (reporter *DefaultReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary)

func (*DefaultReporter) SpecDidComplete

func (reporter *DefaultReporter) SpecDidComplete(specSummary *types.SpecSummary)

func (*DefaultReporter) SpecSuiteDidEnd

func (reporter *DefaultReporter) SpecSuiteDidEnd(summary *types.SuiteSummary)

func (*DefaultReporter) SpecSuiteWillBegin

func (reporter *DefaultReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary)

func (*DefaultReporter) SpecWillRun

func (reporter *DefaultReporter) SpecWillRun(specSummary *types.SpecSummary)

type FakeReporter

type FakeReporter struct {
	Config config.GinkgoConfigType

	BeginSummary         *types.SuiteSummary
	BeforeSuiteSummary   *types.SetupSummary
	SpecWillRunSummaries []*types.SpecSummary
	SpecSummaries        []*types.SpecSummary
	AfterSuiteSummary    *types.SetupSummary
	EndSummary           *types.SuiteSummary

	SpecWillRunStub     func(specSummary *types.SpecSummary)
	SpecDidCompleteStub func(specSummary *types.SpecSummary)
}

FakeReporter is useful for testing purposes

func NewFakeReporter

func NewFakeReporter() *FakeReporter

func (*FakeReporter) AfterSuiteDidRun

func (fakeR *FakeReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary)

func (*FakeReporter) BeforeSuiteDidRun

func (fakeR *FakeReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary)

func (*FakeReporter) SpecDidComplete

func (fakeR *FakeReporter) SpecDidComplete(specSummary *types.SpecSummary)

func (*FakeReporter) SpecSuiteDidEnd

func (fakeR *FakeReporter) SpecSuiteDidEnd(summary *types.SuiteSummary)

func (*FakeReporter) SpecSuiteWillBegin

func (fakeR *FakeReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary)

func (*FakeReporter) SpecWillRun

func (fakeR *FakeReporter) SpecWillRun(specSummary *types.SpecSummary)

type JUnitFailureMessage

type JUnitFailureMessage struct {
	Type    string `xml:"type,attr"`
	Message string `xml:",chardata"`
}

type JUnitPassedMessage added in v1.9.0

type JUnitPassedMessage struct {
	Message string `xml:",chardata"`
}

type JUnitReporter

type JUnitReporter struct {
	ReporterConfig config.DefaultReporterConfigType
	// contains filtered or unexported fields
}

func NewJUnitReporter

func NewJUnitReporter(filename string) *JUnitReporter

NewJUnitReporter creates a new JUnit XML reporter. The XML will be stored in the passed in filename.

func (*JUnitReporter) AfterSuiteDidRun

func (reporter *JUnitReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary)

func (*JUnitReporter) BeforeSuiteDidRun

func (reporter *JUnitReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary)

func (*JUnitReporter) SpecDidComplete

func (reporter *JUnitReporter) SpecDidComplete(specSummary *types.SpecSummary)

func (*JUnitReporter) SpecSuiteDidEnd

func (reporter *JUnitReporter) SpecSuiteDidEnd(summary *types.SuiteSummary)

func (*JUnitReporter) SpecSuiteWillBegin

func (reporter *JUnitReporter) SpecSuiteWillBegin(ginkgoConfig config.GinkgoConfigType, summary *types.SuiteSummary)

func (*JUnitReporter) SpecWillRun

func (reporter *JUnitReporter) SpecWillRun(specSummary *types.SpecSummary)

type JUnitSkipped

type JUnitSkipped struct {
	Message string `xml:",chardata"`
}

type JUnitTestCase

type JUnitTestCase struct {
	Name           string               `xml:"name,attr"`
	ClassName      string               `xml:"classname,attr"`
	PassedMessage  *JUnitPassedMessage  `xml:"passed,omitempty"`
	FailureMessage *JUnitFailureMessage `xml:"failure,omitempty"`
	Skipped        *JUnitSkipped        `xml:"skipped,omitempty"`
	Time           float64              `xml:"time,attr"`
	SystemOut      string               `xml:"system-out,omitempty"`
}

type JUnitTestSuite

type JUnitTestSuite struct {
	XMLName   xml.Name        `xml:"testsuite"`
	TestCases []JUnitTestCase `xml:"testcase"`
	Name      string          `xml:"name,attr"`
	Tests     int             `xml:"tests,attr"`
	Failures  int             `xml:"failures,attr"`
	Errors    int             `xml:"errors,attr"`
	Time      float64         `xml:"time,attr"`
}

type Reporter

type Reporter interface {
	SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary)
	BeforeSuiteDidRun(setupSummary *types.SetupSummary)
	SpecWillRun(specSummary *types.SpecSummary)
	SpecDidComplete(specSummary *types.SpecSummary)
	AfterSuiteDidRun(setupSummary *types.SetupSummary)
	SpecSuiteDidEnd(summary *types.SuiteSummary)
}

type TeamCityReporter

type TeamCityReporter struct {
	ReporterConfig config.DefaultReporterConfigType
	// contains filtered or unexported fields
}

func NewTeamCityReporter

func NewTeamCityReporter(writer io.Writer) *TeamCityReporter

func (*TeamCityReporter) AfterSuiteDidRun

func (reporter *TeamCityReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary)

func (*TeamCityReporter) BeforeSuiteDidRun

func (reporter *TeamCityReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary)

func (*TeamCityReporter) SpecDidComplete

func (reporter *TeamCityReporter) SpecDidComplete(specSummary *types.SpecSummary)

func (*TeamCityReporter) SpecSuiteDidEnd

func (reporter *TeamCityReporter) SpecSuiteDidEnd(summary *types.SuiteSummary)

func (*TeamCityReporter) SpecSuiteWillBegin

func (reporter *TeamCityReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary)

func (*TeamCityReporter) SpecWillRun

func (reporter *TeamCityReporter) SpecWillRun(specSummary *types.SpecSummary)

Directories

Path Synopsis
support/go-isatty
Package isatty implements interface to isatty
Package isatty implements interface to isatty

Jump to

Keyboard shortcuts

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