lib

package
v0.0.0-...-5f073f0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonPathPrefix

func CommonPathPrefix(paths []string) (string, error)

CommonPathPrefix returns the common prefix of all the paths given. This is a directory that contains all of the given paths.

Types

type FailedResult

type FailedResult struct {
	TestResult
	ExitCode int `json:"exitcode"`
}

FailedResult is a type for a test result that failed.

func (FailedResult) String

func (result FailedResult) String() string

type PassedResult

type PassedResult TestResult

PassedResult is a type for a test result that passed.

func (PassedResult) String

func (result PassedResult) String() string

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner runs a series of tests and displays its results.

func NewRunner

func NewRunner(
	stdout io.Writer,
	stderr io.Writer,
	options RunnerOptions,
) *Runner

NewRunner constructs a new Runner.

func (*Runner) RunCommand

func (r *Runner) RunCommand() error

RunCommand is the public entrypoint of the Runner. It gathers test scripts, runs them, and displays the result.

type RunnerOptions

type RunnerOptions struct {
	TestTargets  []string
	IncludeReStr string
	ExcludeReStr string
	Timeout      time.Duration
	InOrder      bool
	RandomSeed   int64
	JSONOutput   bool
	Verbose      bool
	DryRun       bool
}

RunnerOptions represents options passed to the Runner.

type SkippedResult

type SkippedResult TestResult

SkippedResult is a type for a test result that skipped.

func (SkippedResult) String

func (result SkippedResult) String() string

type TestResult

type TestResult struct {
	TestFile string `json:"filename"`
}

TestResult contains the result of a single test script.

Jump to

Keyboard shortcuts

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