Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Ignored         = "ignored"
	Disabled        = "disabled"
	Passed          = "passed"
	Failed          = "failed"
	Panicked        = "panicked"
	BuildFailure    = "build failure"
	NoTestFiles     = "no test files"
	NoTestFunctions = "no test functions"
	NoGoFiles       = "no go code"

	TestRunAbortedUnexpectedly = "test run aborted unexpectedly"
)

Functions

This section is empty.

Types

type CompleteOutput

type CompleteOutput struct {
	Packages []*PackageResult
	Revision string
	Paused   bool
}

type Executor

type Executor interface {
	ExecuteTests([]*Package) *CompleteOutput
	Status() string
	ClearStatusFlag() bool
}

type Package

type Package struct {
	Path          string
	Name          string
	Ignored       bool
	Disabled      bool
	BuildTags     []string
	TestArguments []string
	Error         error
	Output        string
	Result        *PackageResult

	HasImportCycle bool
}

func NewPackage

func NewPackage(folder *messaging.Folder, name string, hasImportCycle bool) *Package

func (*Package) Active

func (self *Package) Active() bool

func (*Package) HasUsableResult

func (self *Package) HasUsableResult() bool

type PackageResult

type PackageResult struct {
	PackageName string
	Elapsed     float64
	Coverage    float64
	Outcome     string
	BuildOutput string
	TestResults []TestResult
}

func NewPackageResult

func NewPackageResult(packageName string) *PackageResult

type Server

type Server interface {
	ReceiveUpdate(root string, update *CompleteOutput)
	Watch(writer http.ResponseWriter, request *http.Request)
	Ignore(writer http.ResponseWriter, request *http.Request)
	Reinstate(writer http.ResponseWriter, request *http.Request)
	Status(writer http.ResponseWriter, request *http.Request)
	LongPollStatus(writer http.ResponseWriter, request *http.Request)
	Results(writer http.ResponseWriter, request *http.Request)
	Execute(writer http.ResponseWriter, request *http.Request)
	TogglePause(writer http.ResponseWriter, request *http.Request)
}

type Shell

type Shell interface {
	GoTest(directory, packageName string, tags, arguments []string) (output string, err error)
}

type TestResult

type TestResult struct {
	TestName string
	Elapsed  float64
	Passed   bool
	Skipped  bool
	File     string
	Line     int
	Message  string
	Error    string
	Stories  []reporting.ScopeResult

	RawLines []string `json:",omitempty"`
}

func NewTestResult

func NewTestResult(testName string) *TestResult