Documentation
¶
Overview ¶
Package test provides interfaces for running TTCN-3 test cases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is responsible for running test cases. Essentially you put jobs in and events come out.
func (*Controller) EnqueueJob ¶
func (c *Controller) EnqueueJob(job *Job) error
EnqueueJob puts a job in the queue.
func (*Controller) Events ¶
func (c *Controller) Events() <-chan Event
Events returns a channel that emits events.
func (*Controller) NewController ¶
func (c *Controller) NewController(e Executor) *Controller
NewController creates a new Controller for executing tests using the given executor.
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 {
// 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
// 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 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 ¶
StopEvent is an event that is emitted when the test is stopped.
func NewStopEvent ¶
NewStopEvent creates a new StopEvent.
type TickerEvent ¶
type TickerEvent struct {
// contains filtered or unexported fields
}
TickerEvent is an event that is emitted periodically during the test execution.