Documentation ¶
Index ¶
- func ExtractDuration(line string) (string, bool)
- func ExtractOutput(line string) (string, int, bool)
- func ExtractPackage(line string) (name string, duration string, coverage string, ok bool)
- func ExtractProperties(line string) (map[string]string, bool)
- func ExtractResult(line string) (r api.TestResult, name string, depth int, duration string, ok bool)
- func ExtractRun(line string) (string, bool)
- func NewParser(builder builder.TestSuitesBuilder, stream bool) parser.TestOutputParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractDuration ¶
ExtractDuration extracts the package duration from a test output line
func ExtractOutput ¶
ExtractOutput captures a line of output indented by whitespace and returns the output, the indentation depth (4 spaces is the canonical indentation used by go test), and whether the match was successful.
func ExtractPackage ¶
ExtractPackage extracts the name of the test suite from a test package line.
func ExtractProperties ¶
ExtractProperties extracts any metadata properties of the test suite from a test output line
func ExtractResult ¶
func ExtractResult(line string) (r api.TestResult, name string, depth int, duration string, ok bool)
ExtractResult extracts the test result from a test output line. Depth is measured as the leading whitespace for the line multiplied by four, which is used to identify output from nested Go subtests.
func ExtractRun ¶
ExtractRun identifies the start of a test output section.
func NewParser ¶
func NewParser(builder builder.TestSuitesBuilder, stream bool) parser.TestOutputParser
NewParser returns a new parser that's capable of parsing Go unit test output
Types ¶
This section is empty.