lib

package
v0.0.0-...-3be20e2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PASS = "pass"
	FAIL = "fail"
	SKIP = "skip"
)

Variables

This section is empty.

Functions

func GenerateHTML

func GenerateHTML(templateStr string, summary *TestSummary) (string, error)

Types

type Error

type Error struct {
	Message string `xml:"message,attr"`
}

type ResultXML

type ResultXML struct {
	XMLName   xml.Name   `xml:"testsuites"`
	TestSuite *TestSuite `xml:"testsuite"`
}

type Results

type Results map[string][]*Test

type Test

type Test struct {
	TestName string `json:"test_name"`
	Time     int    `json:"time"`
	Output   string `json:"output"`
	Status   string
}

type TestCase

type TestCase struct {
	Duration int    `xml:"duration,int64"`
	Error    *Error `xml:"error"`
}

type TestSuite

type TestSuite struct {
	Name     string    `xml:"name,attr"`
	TestCase *TestCase `xml:"testcase"`
	Output   string    `xml:"system-out"`
}

type TestSummary

type TestSummary struct {
	TotalTests  int     `json:"total_tests"`
	BuildErrors string  `json:"build_errors"`
	Results     Results `json:"results"`
}

func Parse

func Parse(bazelTestLogsDirectory string, buildErrReader io.Reader) (*TestSummary, error)

Jump to

Keyboard shortcuts

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