execute

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(plan *plan.Plan) <-chan TestResponse

Run the test program for a given Plan

func Wait

func Wait(hosts []string, timeout time.Duration)

Wait for hosts to become ready

Types

type Result

type Result struct {
	Status Status
	Output string
}

Result is the outcome of an individual test case ran by the test client

type Status

type Status int

Status is an enum that represents test success/failure

const (
	// Success indicates a client's TestCase passed
	Success Status = 1 + iota

	// Failed indicates a client's TestCase did not pass
	Failed

	// Skipped indicates a client' TestCase did not run
	Skipped
)

func (Status) MarshalText

func (s Status) MarshalText() ([]byte, error)

func (Status) String

func (s Status) String() string

type StatusSummary

type StatusSummary struct {
	Status  Status
	Total   int
	Skipped int
	Passed  int
	Failed  int
}

StatusSummary contains the status report of a TestReponse, see SummarizeStatus.

type TestResponse

type TestResponse struct {
	TestCase plan.TestCase
	Results  []Result
}

TestResponse contains the reply from a test client, most importantly, contains a list of Results for the test cases ran by the test client

func (*TestResponse) SummarizeStatus

func (test *TestResponse) SummarizeStatus() StatusSummary

SummarizeStatus returns a summary of the TestResponse, compiling it from all the Results pertaining to it.

Jump to

Keyboard shortcuts

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