Documentation
¶
Overview ¶
Package control provides the test control and management interface.
Package control provides the test control and management interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoFactory = errors.New("factory is not set")
var ErrNoSuch = errors.New("no such")
Functions ¶
This section is empty.
Types ¶
type Controller ¶
A Controller executes jobs in parallel.
type ErrorEvent ¶
type ErrorEvent struct { Err error // contains filtered or unexported fields }
ErrorEvent is an error event.
func NewErrorEvent ¶
func NewErrorEvent(err error) ErrorEvent
NewError wraps an error into an ErrorEvent. It uses time.Now() as the time when the event happened.
func (ErrorEvent) Error ¶
func (e ErrorEvent) Error() string
func (ErrorEvent) Unwrap ¶
func (e ErrorEvent) Unwrap() error
type Job ¶
type Job struct { // ID is the unique identifier of the job. ID string // Name is the fully qualified name of the test or control function. Name string // Args is the list of arguments to pass to the test. Args []string // Timeout is the duration after which the job will be stopped. Timeout time.Duration // Module Parameters ModulePars map[string]string // Dir specifies the working directory for the job. Dir string // Env specifies the environment variables to pass to the job. Env []string // Config provides the project configuration *project.Config }
Job describes the test or control function to be executed.
type JobError ¶
JobError describes an error that occurred during the execution of a test or control function.
type LogEvent ¶
LogEvent is an event that provided additional information about the test execution.
func NewLogEvent ¶
type Option ¶
type Option func(*Controller) error
func MaxWorkers ¶
func WithFactory ¶
func WithFactory(f RunnerFactory) Option
type StartEvent ¶
StartEvent is an event that is emitted when the test is started.
func NewStartEvent ¶
func NewStartEvent(job *Job, name string) StartEvent
NewStartEvent creates a new StartEvent.
type StopEvent ¶
type StopEvent struct { Name string Verdict string Begin time.Time *Job // contains filtered or unexported fields }
StopEvent is an event that is emitted when the test is stopped.
func NewStopEvent ¶
NewStopEvent creates a new StopEvent.
type TestPlan ¶
type TestPlan struct { // Controls is a ordered list of fully qualified control functions. Controls []string // Tests is a ordered list of fully qualified test case names. Tests []string // contains filtered or unexported fields }
A TestPlan is a ordered collection of test cases and runtime parameters.
func NewTestPlan ¶
NewTestPlan parses the TTCN-3 sources provided in the given project configuration and crestes an empty test plan. Syntax errors in the TTCN-3 source files are ignored. The given configuration must not be nil.
type TickerEvent ¶
type TickerEvent struct { *Job // contains filtered or unexported fields }
TickerEvent is an event that is emitted periodically during the test execution.
func NewTickerEvent ¶
func NewTickerEvent(job *Job) TickerEvent
NewTickerEvent creates a new TickerEvent.