plan

package
v0.0.0-...-eea24ac Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2017 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Axes

type Axes []Axis

Axes is a slice of "Axis"

func (Axes) Index

func (a Axes) Index() map[string]Axis

Index returns the Axes indexed by name of Axis.

func (Axes) Len

func (a Axes) Len() int

func (Axes) Less

func (a Axes) Less(i, j int) bool

func (Axes) Swap

func (a Axes) Swap(i, j int)

type Axis

type Axis struct {
	Name   string
	Values []string
}

Axes is a collection of Axis objects sortable by axis name.

type AxisMatcher

type AxisMatcher struct {
	Name  string
	Value string
}

AxisMatcher matches an axis name to a give value.

func (AxisMatcher) Matches

func (a AxisMatcher) Matches(args TestClientArgs) bool

Matches returns true if the given TestClientArgs match this AxisMatcher.

func (AxisMatcher) String

func (a AxisMatcher) String() string

String return a formatted string for axis and value separated by colon.

type Behavior

type Behavior struct {
	Name       string
	ClientAxis string
	ParamsAxes []string
	Filters    []Filter
}

Behavior represents the test behavior that will be triggered by crossdock.

func (Behavior) HasAxis

func (b Behavior) HasAxis(axisToFind string) bool

HasAxis checks and returns true if the passed axis is referenced by the behavior, false otherwise.

type Behaviors

type Behaviors []Behavior

Behaviors is a collection of Behavior objects sortable by behavior name.

func (Behaviors) Len

func (b Behaviors) Len() int

func (Behaviors) Less

func (b Behaviors) Less(i, j int) bool

func (Behaviors) Swap

func (b Behaviors) Swap(i, j int)

type Config

type Config struct {
	Reports        []string
	CallTimeout    time.Duration
	WaitForTimeout time.Duration
	WaitForHosts   []string
	Axes           Axes
	Behaviors      Behaviors
	JSONReportPath string
}

Config describes the unstructured test plan

func ReadConfigFromEnviron

func ReadConfigFromEnviron() (*Config, error)

ReadConfigFromEnviron creates a Config by looking for environment variables

type Filter

type Filter struct {
	Matchers []AxisMatcher
}

Filter specifies criteria for skipping specific test cases of a behavior. All test cases for a behavior where all parameter values match the AxisMatcher will be skipped.

func (Filter) Matches

func (f Filter) Matches(testArgs TestClientArgs) bool

Matches returns true if all matchers associated with this Filter match the given test arguments.

func (Filter) String

func (f Filter) String() string

String returns formatted matches in the Filter separated by a'+'.

type Plan

type Plan struct {
	Config    *Config
	TestCases []TestCase
	// contains filtered or unexported fields
}

Plan describes the entirety of the test program

func New

func New(config *Config) *Plan

New creates a Plan given a Config

type TestCase

type TestCase struct {
	Plan       *Plan
	Client     string
	Arguments  TestClientArgs
	Skip       bool
	SkipReason string
}

TestCase represents the request made to test clients.

type TestClientArgs

type TestClientArgs map[string]string

TestClientArgs represents custom args to pass to test client.

Jump to

Keyboard shortcuts

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