wstesting

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunFeature

func RunFeature(t *testing.T, filename string, opts ...Context)

RunFeature runs a feature test.

Types

type Context

type Context struct {
	// CurrentDir is the current working directory when resolving relative path
	// names contained in the scenario.
	CurrentDir string

	// Defs are the worksheet definitions used when running the scenarions. In
	// the case where plugins are required, the definitions must be provided
	// directly via the context rather than relying solely on loading definitions
	// from a ws definition file.
	Defs *worksheets.Definitions
	// contains filtered or unexported fields
}

Context holds all that is necessery to run a scenario.

type Scenario

type Scenario struct {
	// Name is the scenario's name.
	Name string
	// contains filtered or unexported fields
}

Scenario represents a single scenario from a .feature.

func ReadFeature

func ReadFeature(reader io.Reader, source string) ([]Scenario, error)

ReadFeature reads a feature in gherkin syntax, and parses out all the scenarios contained herein.

func (Scenario) Run

func (s Scenario) Run(ctx Context) error

Run runs the scenario using the provided context.

Jump to

Keyboard shortcuts

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