Help us shape the future of Go! Take the 2026 Go Developer Survey

feature

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Step bodies stay as text. Scenario outlines are expanded here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowsEnv

func AllowsEnv(tags []string, env string) bool

func HasTag

func HasTag(tags []string, name string) bool

func Selected

func Selected(tags []string, expr string) (bool, error)

Selected reports whether tags satisfy a tag expression. A bare name matches that tag. Commas and "or" match any. "and" matches all. "not" and a leading "~" negate. anyOf() and allOf() are the same two operations.

Types

type File

type File struct {
	Path        string
	Name        string
	Description string
	Tags        []string
	Load        LoadSpec
	Background  []Step
	Scenarios   []Scenario
}

func Parse

func Parse(path, source string) (*File, error)

func ParseFile

func ParseFile(path string) (*File, error)

func (*File) Setup

func (f *File) Setup(name string) (Scenario, bool)

type LoadSpec

type LoadSpec struct {
	VUs        int
	Duration   time.Duration
	RPS        int
	Warmup     time.Duration
	Thresholds []string
}

type Scenario

type Scenario struct {
	Name      string
	Line      int
	Tags      []string
	Steps     []Step
	Lead      int // inlined background steps; @setup runs the rest
	IsSetup   bool
	SetupName string
	Outline   string // single-column examples header, expanded at run time
	Row       map[string]any
	Num       int
	OutlineID int
}

func Materialize

func Materialize(sc Scenario, rows []map[string]any) ([]Scenario, error)

type Step

type Step struct {
	Keyword   string
	Text      string
	DocString string
	Rows      [][]string
	Line      int
	Label     string
}

Jump to

Keyboard shortcuts

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