Documentation
¶
Index ¶
- func FormatSummaryReport(outcome *models.EvaluationOutcome) string
- func InterpretFlaky(flaky bool, passRate float64) string
- func InterpretPassRate(rate float64) string
- func InterpretScore(score float64) string
- func WriteJUnitXML(outcome *models.EvaluationOutcome, path string) error
- type JUnitError
- type JUnitFailure
- type JUnitProperty
- type JUnitSkipped
- type JUnitTestCase
- type JUnitTestSuite
- type JUnitTestSuites
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatSummaryReport ¶
func FormatSummaryReport(outcome *models.EvaluationOutcome) string
FormatSummaryReport produces a full plain-language report from an EvaluationOutcome.
func InterpretFlaky ¶
InterpretFlaky explains whether results are flaky and what that means.
func InterpretPassRate ¶
InterpretPassRate returns a human-readable explanation of a pass rate (0–1).
func InterpretScore ¶
InterpretScore returns a plain-language label for a numeric score (0–1).
func WriteJUnitXML ¶
func WriteJUnitXML(outcome *models.EvaluationOutcome, path string) error
WriteJUnitXML writes JUnit XML to the specified file path.
Types ¶
type JUnitError ¶
type JUnitError struct {
Message string `xml:"message,attr"`
Type string `xml:"type,attr"`
Body string `xml:",chardata"`
}
JUnitError represents an unexpected error during test execution.
type JUnitFailure ¶
type JUnitFailure struct {
Message string `xml:"message,attr"`
Type string `xml:"type,attr"`
Body string `xml:",chardata"`
}
JUnitFailure represents a test assertion failure.
type JUnitProperty ¶
JUnitProperty is a key-value metadata entry.
type JUnitSkipped ¶
type JUnitSkipped struct {
Message string `xml:"message,attr,omitempty"`
}
JUnitSkipped marks a test as skipped.
type JUnitTestCase ¶
type JUnitTestCase struct {
XMLName xml.Name `xml:"testcase"`
Name string `xml:"name,attr"`
Classname string `xml:"classname,attr"`
Time float64 `xml:"time,attr"`
Failure *JUnitFailure `xml:"failure,omitempty"`
Error *JUnitError `xml:"error,omitempty"`
Skipped *JUnitSkipped `xml:"skipped,omitempty"`
}
JUnitTestCase maps to one eval task.
type JUnitTestSuite ¶
type JUnitTestSuite struct {
XMLName xml.Name `xml:"testsuite"`
Name string `xml:"name,attr"`
Tests int `xml:"tests,attr"`
Failures int `xml:"failures,attr"`
Errors int `xml:"errors,attr"`
Skipped int `xml:"skipped,attr"`
Time float64 `xml:"time,attr"`
Timestamp string `xml:"timestamp,attr"`
Properties []JUnitProperty `xml:"properties>property,omitempty"`
TestCases []JUnitTestCase `xml:"testcase"`
}
JUnitTestSuite maps to one evaluation run.
type JUnitTestSuites ¶
type JUnitTestSuites struct {
XMLName xml.Name `xml:"testsuites"`
Tests int `xml:"tests,attr"`
Failures int `xml:"failures,attr"`
Errors int `xml:"errors,attr"`
Time float64 `xml:"time,attr"`
TestSuites []JUnitTestSuite `xml:"testsuite"`
}
JUnitTestSuites is the top-level container.
func ConvertToJUnit ¶
func ConvertToJUnit(outcome *models.EvaluationOutcome) *JUnitTestSuites
ConvertToJUnit converts an EvaluationOutcome to JUnit XML format.