Documentation ¶
Overview ¶
Package lib is exposing parsers and output generation
Index ¶
Constants ¶
const ( // XUnitTemplate is XML template for xunit style reporting XUnitTemplate string = `` /* 499-byte string literal not displayed */ // XMLMultiTemplate is template when we have multiple suites XMLMultiTemplate string = ` <testsuites>` + XUnitTemplate + `</testsuites> ` // XUnitNetTemplate is XML template for xunit.net // see https://xunit.codeplex.com/wikipage?title=XmlFormat XUnitNetTemplate string = `` /* 1067-byte string literal not displayed */ )
Variables ¶
var Options struct { // FailOnRace will mark test a failed if there is a race FailOnRace bool }
Options is library options
Functions ¶
Types ¶
type LineScanner ¶
LineScanner scans lines and keep track of line numbers
func NewLineScanner ¶
func NewLineScanner(r io.Reader) *LineScanner
NewLineScanner creates a new line scanner from r
type Status ¶
type Status int
Status is test status
func Token2Status ¶
Token2Status return matching status for token
type Suite ¶
Suite of tests (found in some unit testing frameworks)
func (*Suite) NumSkipped ¶
NumSkipped return number of skipped tests in suite
type SuiteStack ¶
type SuiteStack struct {
// contains filtered or unexported fields
}
SuiteStack is a stack of test suites
func (*SuiteStack) Pop ¶
func (s *SuiteStack) Pop() *Suite
Pop removes and returns a node from the stack in last to first order.
type Suites ¶
type Suites []*Suite
Suites is a list of suites
func ParseGocheck ¶
ParseGocheck parses output of "go test -gocheck.vv", returns a list of tests See data/gocheck.out for an example TODO: Refactor to shorter ones
func ParseGotest ¶
ParseGotest parser output of gotest TODO: Make it shorter
func (Suites) HasFailures ¶
HasFailures return true is there's at least one failing suite