Documentation ¶
Index ¶
- Constants
- func CreateReport(result Result, out io.Writer, temp *template.Template) (err error)
- func EscapeHtml(input string) (escapedHtml string)
- func EscapeMarkdown(input string) (escapedMarkdown string)
- func GetTemplate(pathToTemplate string) (tmp *template.Template, err error)
- func IsLess(a_PackageResult, b_PackageResult FinalTestStatus, ...) bool
- type FinalTestStatus
- type OutputLine
- type PackageName
- type PackageResult
- type Result
- type TestAction
- type TestEvent
- type TestResult
Constants ¶
View Source
const NonBreakingSpace = " "
Variables ¶
This section is empty.
Functions ¶
func CreateReport ¶
func EscapeHtml ¶
func EscapeMarkdown ¶
Types ¶
type FinalTestStatus ¶
type FinalTestStatus uint8
const ( FTPSSkip FinalTestStatus = iota FTSPass FTSFail )
func FinalTestStatusFromAction ¶
func FinalTestStatusFromAction(e TestAction) *FinalTestStatus
func (FinalTestStatus) Icon ¶
func (fs FinalTestStatus) Icon() string
func (FinalTestStatus) String ¶
func (fs FinalTestStatus) String() string
type OutputLine ¶
type PackageName ¶
type PackageName string
func (PackageName) Package ¶
func (p PackageName) Package() string
func (PackageName) Path ¶
func (p PackageName) Path() string
type PackageResult ¶
type PackageResult struct { Name PackageName Duration time.Duration PackageResult FinalTestStatus Succeeded int Tests []TestResult }
func (PackageResult) String ¶
func (p PackageResult) String() string
type Result ¶
type TestAction ¶
type TestAction uint8
const ( TAUnknown TestAction = iota TARun // the test has started running TAPause // the test has been paused TACont // the test has continued running TAPass // the test passed TABench // the benchmark printed log output but did not fail TAFail // the test or benchmark failed TAOutput // the test printed output TASkip // the test was skipped or the package contained no tests )
func TestActionFromString ¶
func TestActionFromString(s string) TestAction
func (TestAction) String ¶
func (ta TestAction) String() string
func (*TestAction) UnmarshalJSON ¶
func (b *TestAction) UnmarshalJSON(data []byte) error
type TestEvent ¶
type TestEvent struct { Time time.Time `json:"time,omitempty"` // encodes as an RFC3339-format string Action TestAction `json:"action,omitempty"` Package string `json:"package,omitempty"` Test string `json:"test,omitempty"` ElapsedSec float64 `json:"elapsed,omitempty"` // seconds Output string `json:"output,omitempty"` }
Test event represents a single json test output line. Implements the marshaller interface From https://pkg.go.dev/cmd/test2json
type TestResult ¶
type TestResult struct { Name string Duration time.Duration Output []OutputLine TestResult FinalTestStatus }
Click to show internal directories.
Click to hide internal directories.