lib

package
v0.0.0-...-2b2c18d Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 9 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 Coverage

type Coverage struct {
	PackageName string  `json:"package_name"`
	Coverage    float64 `json:"coverage"`
}

type Results

type Results map[string][]*Test

type Test

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

type TestSummary

type TestSummary struct {
	Name          string      `json:"name"`
	TotalTests    int         `json:"total_tests"`
	BuildErrors   string      `json:"build_errors"`
	Results       Results     `json:"results"`
	TotalCoverage float64     `json:"total_coverage"`
	Coverages     []*Coverage `json:"coverages"`
}

func Parse

func Parse(stdoutReader, stderrReader, coverageReader io.Reader) (*TestSummary, error)

Jump to

Keyboard shortcuts

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