types

package
Version: v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const GINKGO_FOCUS_EXIT_CODE = 197

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeLocation

type CodeLocation struct {
	FileName       string
	LineNumber     int
	FullStackTrace string
}

func (CodeLocation) String

func (codeLocation CodeLocation) String() string

type FlagType

type FlagType uint
const (
	FlagTypeNone FlagType = iota
	FlagTypeFocused
	FlagTypePending
)

type RemoteAfterSuiteData

type RemoteAfterSuiteData struct {
	CanRun bool
}

type RemoteBeforeSuiteData

type RemoteBeforeSuiteData struct {
	Data  []byte
	State RemoteBeforeSuiteState
}

func (RemoteBeforeSuiteData) ToJSON

func (r RemoteBeforeSuiteData) ToJSON() []byte

type RemoteBeforeSuiteState

type RemoteBeforeSuiteState int
const (
	RemoteBeforeSuiteStateInvalid RemoteBeforeSuiteState = iota

	RemoteBeforeSuiteStatePending
	RemoteBeforeSuiteStatePassed
	RemoteBeforeSuiteStateFailed
	RemoteBeforeSuiteStateDisappeared
)

type SetupSummary

type SetupSummary struct {
	ComponentType SpecComponentType
	CodeLocation  CodeLocation

	State   SpecState
	RunTime time.Duration
	Failure SpecFailure

	CapturedOutput string
	SuiteID        string
}

type SpecComponentType

type SpecComponentType uint
const (
	SpecComponentTypeInvalid SpecComponentType = iota

	SpecComponentTypeContainer
	SpecComponentTypeBeforeSuite
	SpecComponentTypeAfterSuite
	SpecComponentTypeBeforeEach
	SpecComponentTypeJustBeforeEach
	SpecComponentTypeAfterEach
	SpecComponentTypeIt
	SpecComponentTypeMeasure
)

type SpecFailure

type SpecFailure struct {
	Message        string
	Location       CodeLocation
	ForwardedPanic string

	ComponentIndex        int
	ComponentType         SpecComponentType
	ComponentCodeLocation CodeLocation
}

type SpecMeasurement

type SpecMeasurement struct {
	Name  string
	Info  interface{}
	Order int

	Results []float64

	Smallest     float64
	Largest      float64
	Average      float64
	StdDeviation float64

	SmallestLabel string
	LargestLabel  string
	AverageLabel  string
	Units         string
	Precision     int
}

func (SpecMeasurement) PrecisionFmt added in v1.3.0

func (s SpecMeasurement) PrecisionFmt() string

type SpecState

type SpecState uint
const (
	SpecStateInvalid SpecState = iota

	SpecStatePending
	SpecStateSkipped
	SpecStatePassed
	SpecStateFailed
	SpecStatePanicked
	SpecStateTimedOut
)

func (SpecState) IsFailure added in v1.3.0

func (state SpecState) IsFailure() bool

type SpecSummary

type SpecSummary struct {
	ComponentTexts         []string
	ComponentCodeLocations []CodeLocation

	State           SpecState
	RunTime         time.Duration
	Failure         SpecFailure
	IsMeasurement   bool
	NumberOfSamples int
	Measurements    map[string]*SpecMeasurement

	CapturedOutput string
	SuiteID        string
}

func (SpecSummary) Failed

func (s SpecSummary) Failed() bool

func (SpecSummary) HasFailureState

func (s SpecSummary) HasFailureState() bool

func (SpecSummary) Panicked

func (s SpecSummary) Panicked() bool

func (SpecSummary) Passed

func (s SpecSummary) Passed() bool

func (SpecSummary) Pending

func (s SpecSummary) Pending() bool

func (SpecSummary) Skipped

func (s SpecSummary) Skipped() bool

func (SpecSummary) TimedOut

func (s SpecSummary) TimedOut() bool

type SuiteSummary

type SuiteSummary struct {
	SuiteDescription string
	SuiteSucceeded   bool
	SuiteID          string

	NumberOfSpecsBeforeParallelization int
	NumberOfTotalSpecs                 int
	NumberOfSpecsThatWillBeRun         int
	NumberOfPendingSpecs               int
	NumberOfSkippedSpecs               int
	NumberOfPassedSpecs                int
	NumberOfFailedSpecs                int
	// Flaked specs are those that failed initially, but then passed on a
	// subsequent try.
	NumberOfFlakedSpecs int
	RunTime             time.Duration
}

SuiteSummary represents the a summary of the test suite and is passed to both Reporter.SpecSuiteWillBegin Reporter.SpecSuiteDidEnd

this is unfortunate as these two methods should receive different objects. When running in parallel each node does not deterministically know how many specs it will end up running.

Unfortunately making such a change would break backward compatibility.

Until Ginkgo 2.0 comes out we will continue to reuse this struct but populate unkown fields with -1.

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