Documentation
¶
Overview ¶
Package disttest provides utilities for recording and reporting distributed test results. It includes functions to wrap test cases, record failures, and write results to a JSON file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fail ¶ added in v0.0.7
Fail records a failure reason for the current test and fails the test. It should be used instead of t.Fatal or t.Errorf to ensure the failure reason is recorded.
Types ¶
type ResultType ¶
type ResultType string
const ( TypeSuccess ResultType = "success" TypeFailure ResultType = "failure" TypePanic ResultType = "panic" )
type TestResult ¶
type TestResult struct {
Type ResultType `json:"type"`
Name string `json:"name"`
DurationMs int64 `json:"duration_ms"`
Message string `json:"message,omitempty"`
Panic string `json:"panic,omitempty"`
}
TestResult represents the result of a single test execution.
Click to show internal directories.
Click to hide internal directories.