models

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnmatchedStepArgumentNumber = errors.New("func expected more arguments than given")
	ErrCannotConvert               = errors.New("cannot convert argument")
	ErrUnsupportedParameterType    = errors.New("func has unsupported parameter type")
)

matchable errors

Functions

This section is empty.

Types

type Feature

type Feature struct {
	*messages.GherkinDocument
	Pickles []*messages.Pickle
	Content []byte
}

Feature is an internal object to group together the parsed gherkin document, the pickles and the raw content.

func (Feature) FindBackground

func (f Feature) FindBackground(astScenarioID string) *messages.Background

FindBackground ...

func (Feature) FindExample

func (f Feature) FindExample(exampleAstID string) (*messages.Examples, *messages.TableRow)

FindExample ...

func (Feature) FindRule added in v0.12.6

func (f Feature) FindRule(astScenarioID string) *messages.Rule

FindRule returns the rule to which the given scenario belongs

func (Feature) FindScenario

func (f Feature) FindScenario(astScenarioID string) *messages.Scenario

FindScenario returns the scenario in the feature or in a rule in the feature

func (Feature) FindStep

func (f Feature) FindStep(astStepID string) *messages.Step

FindStep ...

type PickleAttachment added in v0.15.0

type PickleAttachment struct {
	Name     string
	MimeType string
	Data     []byte
}

PickleAttachment ...

type PickleResult

type PickleResult struct {
	PickleID  string
	StartedAt time.Time
}

PickleResult ...

type PickleStepResult

type PickleStepResult struct {
	Status     StepResultStatus
	FinishedAt time.Time
	Err        error

	PickleID     string
	PickleStepID string

	Def *StepDefinition

	Attachments []PickleAttachment
}

PickleStepResult ...

func NewStepResult

func NewStepResult(
	status StepResultStatus,
	pickleID, pickleStepID string,
	match *StepDefinition,
	attachments []PickleAttachment,
	err error,
) PickleStepResult

NewStepResult ...

type StepDefinition

type StepDefinition struct {
	formatters.StepDefinition

	Args         []interface{}
	HandlerValue reflect.Value
	File         string
	Line         int

	// multistep related
	Nested    bool
	Undefined []string
}

StepDefinition ...

func (*StepDefinition) GetInternalStepDefinition

func (sd *StepDefinition) GetInternalStepDefinition() *formatters.StepDefinition

GetInternalStepDefinition ...

func (*StepDefinition) Run

func (sd *StepDefinition) Run(ctx context.Context) (context.Context, interface{})

Run a step with the matched arguments using reflect Returns one of ... (context, error) (context, godog.Steps)

type StepResultStatus

type StepResultStatus int

StepResultStatus ...

const (
	// Passed ...
	Passed StepResultStatus = iota
	// Failed ...
	Failed
	// Skipped ...
	Skipped
	// Undefined ...
	Undefined
	// Pending ...
	Pending
	// Ambiguous ...
	Ambiguous
)

func (StepResultStatus) Color

func (st StepResultStatus) Color() colors.ColorFunc

Color ...

func (StepResultStatus) String

func (st StepResultStatus) String() string

String ...

type TestRunStarted

type TestRunStarted struct {
	StartedAt time.Time
}

TestRunStarted ...

Jump to

Keyboard shortcuts

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