Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OutputFormat ¶
type OutputFormat int
OutputFormat specifies the output format for test results.
const ( // FormatDefault outputs summary only (like go test without -v). FormatDefault OutputFormat = iota // FormatVerbose outputs detailed test results (like go test -v). FormatVerbose // FormatJSON outputs JSON test events (like go test -json). FormatJSON )
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter handles formatting and reporting of test results.
func (*Reporter) SetFormat ¶
func (r *Reporter) SetFormat(format OutputFormat)
SetFormat sets the output format for the reporter.
func (*Reporter) StartSuite ¶
func (r *Reporter) StartSuite(suiteName string) *SuiteReporter
StartSuite reports the start of a test suite.
type SuiteReporter ¶ added in v0.1.1
type SuiteReporter struct {
// contains filtered or unexported fields
}
SuiteReporter handles reporting for a specific test suite.
func (*SuiteReporter) End ¶ added in v0.1.1
func (s *SuiteReporter) End()
End reports the end of a test suite.
func (*SuiteReporter) ReportFail ¶ added in v0.1.1
func (s *SuiteReporter) ReportFail(testName, message string)
ReportFail reports a failing test with a message.
func (*SuiteReporter) ReportPass ¶ added in v0.1.1
func (s *SuiteReporter) ReportPass(testName string)
ReportPass reports a passing test.
func (*SuiteReporter) ReportResult ¶ added in v0.1.1
func (s *SuiteReporter) ReportResult(testName string, result *evaluator.TestResult)
ReportResult reports a test result from the evaluator.
func (*SuiteReporter) StartTest ¶ added in v0.1.1
func (s *SuiteReporter) StartTest(testName string)
StartTest reports the start of an individual test.
type TestEvent ¶
type TestEvent struct {
Time time.Time `json:"time"`
Action string `json:"action"`
Package string `json:"package,omitempty"`
Test string `json:"test,omitempty"`
Elapsed float64 `json:"elapsed,omitempty"`
Output string `json:"output,omitempty"`
}
TestEvent represents a JSON test event (similar to go test -json).
Click to show internal directories.
Click to hide internal directories.