testsuit

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: GPL-3.0 Imports: 16 Imported by: 37

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CustomScreenShot *func() []byte
View Source
var T *testingT

T is a wrapper around *testing.T

Functions

This section is empty.

Types

type GaugeContext

type GaugeContext struct {
	Steps                 []Step
	Hooks                 []Hook
	ScenarioStore         map[string]interface{}
	SpecStore             map[string]interface{}
	SuiteStore            map[string]interface{}
	CustomMessageRegistry []string
}

func (*GaugeContext) ClearCustomMessages

func (c *GaugeContext) ClearCustomMessages()

ClearCustomMessages clears the CustomMessageRegistry

func (*GaugeContext) GetHooks

func (c *GaugeContext) GetHooks(hookType HookType, tags []string) []Hook

func (*GaugeContext) GetStepByDesc

func (c *GaugeContext) GetStepByDesc(desc string) (*Step, error)

type Hook

type Hook struct {
	Type     HookType
	Impl     func(*m.ExecutionInfo)
	Tags     []string
	Operator Operator
}

func (*Hook) Execute

func (hook *Hook) Execute(exInfo *m.ExecutionInfo) *m.ProtoExecutionResult

type HookType

type HookType int
const (
	BEFORESUITE    HookType = 1
	BEFORESPEC     HookType = 2
	BEFORESCENARIO HookType = 3
	BEFORESTEP     HookType = 4

	AFTERSUITE    HookType = 5
	AFTERSPEC     HookType = 6
	AFTERSCENARIO HookType = 7
	AFTERSTEP     HookType = 8
)

type Operator

type Operator int
const (
	AND Operator = 1
	OR  Operator = 2
)

type Step

type Step struct {
	Description string
	Impl        interface{}
}

func (*Step) Execute

func (step *Step) Execute(args ...interface{}) *m.ProtoExecutionResult

TODO: Set gauge messasges, screenshot, recoverableError

Jump to

Keyboard shortcuts

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