reporters

package
Version: v0.0.0-...-aa06bc0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2014 License: Apache-2.0 Imports: 7 Imported by: 0

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) ExampleDidComplete

func (reporter *DefaultReporter) ExampleDidComplete(exampleSummary *types.ExampleSummary)

func (*DefaultReporter) ExampleWillRun

func (reporter *DefaultReporter) ExampleWillRun(exampleSummary *types.ExampleSummary)

func (*DefaultReporter) SpecSuiteDidEnd

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

func (*DefaultReporter) SpecSuiteWillBegin

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

type FakeReporter

type FakeReporter struct {
	Config config.GinkgoConfigType

	BeginSummary            *types.SuiteSummary
	ExampleWillRunSummaries []*types.ExampleSummary
	ExampleSummaries        []*types.ExampleSummary
	EndSummary              *types.SuiteSummary
}

FakeReporter is useful for testing purposes

func NewFakeReporter

func NewFakeReporter() *FakeReporter

func (*FakeReporter) ExampleDidComplete

func (fakeR *FakeReporter) ExampleDidComplete(exampleSummary *types.ExampleSummary)

func (*FakeReporter) ExampleWillRun

func (fakeR *FakeReporter) ExampleWillRun(exampleSummary *types.ExampleSummary)

func (*FakeReporter) SpecSuiteDidEnd

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

func (*FakeReporter) SpecSuiteWillBegin

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

type JUnitFailureMessage

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

type JUnitReporter

type JUnitReporter struct {
	// 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) ExampleDidComplete

func (reporter *JUnitReporter) ExampleDidComplete(exampleSummary *types.ExampleSummary)

func (*JUnitReporter) ExampleWillRun

func (reporter *JUnitReporter) ExampleWillRun(exampleSummary *types.ExampleSummary)

func (*JUnitReporter) SpecSuiteDidEnd

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

func (*JUnitReporter) SpecSuiteWillBegin

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

type JUnitSkipped

type JUnitSkipped struct {
	XMLName xml.Name `xml:"skipped"`
}

type JUnitTestCase

type JUnitTestCase struct {
	Name           string               `xml:"name,attr"`
	ClassName      string               `xml:"classname,attr"`
	FailureMessage *JUnitFailureMessage `xml:"failure,omitempty"`
	Skipped        *JUnitSkipped        `xml:"skipped,omitempty"`
	Time           float64              `xml:"time,attr"`
}

type JUnitTestSuite

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

type Reporter

type Reporter interface {
	SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary)
	ExampleWillRun(exampleSummary *types.ExampleSummary)
	ExampleDidComplete(exampleSummary *types.ExampleSummary)
	SpecSuiteDidEnd(summary *types.SuiteSummary)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL