Documentation
¶
Overview ¶
Package json provides machine-readable JSON renderers for test and coverage reports, suitable for dashboards, scripts, and pipeline integrations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CaseOutput ¶
type CaseOutput struct {
Name string `json:"name"`
Status string `json:"status"`
DurationMs int64 `json:"duration_ms"`
Message string `json:"message,omitempty"`
File string `json:"file,omitempty"`
Line int `json:"line,omitempty"`
}
CaseOutput is the JSON representation of a single test case.
type CovOutput ¶
type CovOutput struct {
GeneratedAt string `json:"generated_at"`
Summary CovSummary `json:"summary"`
Files []FileOutput `json:"files"`
}
CovOutput is the JSON envelope for a coverage report.
type CovSummary ¶
type CovSummary struct {
LinesPct float64 `json:"lines_pct"`
LinesCov int `json:"lines_covered"`
LinesTotal int `json:"lines_total"`
BranchPct float64 `json:"branch_pct"`
BranchCov int `json:"branch_covered"`
BranchTotal int `json:"branch_total"`
FuncPct float64 `json:"func_pct"`
FuncCov int `json:"func_covered"`
FuncTotal int `json:"func_total"`
FileCount int `json:"file_count"`
}
CovSummary holds aggregate coverage statistics for a coverage report.
type FileOutput ¶
type FileOutput struct {
Path string `json:"path"`
LinesPct float64 `json:"lines_pct"`
LinesCov int `json:"lines_covered"`
LinesTotal int `json:"lines_total"`
BranchPct float64 `json:"branch_pct,omitempty"`
BranchCov int `json:"branch_covered,omitempty"`
BranchTotal int `json:"branch_total,omitempty"`
FuncPct float64 `json:"func_pct,omitempty"`
FuncCov int `json:"func_covered,omitempty"`
FuncTotal int `json:"func_total,omitempty"`
}
FileOutput is the JSON representation of per-file coverage data.
type SuiteOutput ¶
type SuiteOutput struct {
Name string `json:"name"`
Cases []CaseOutput `json:"cases"`
}
SuiteOutput is the JSON representation of a test suite.
type TestOutput ¶
type TestOutput struct {
GeneratedAt string `json:"generated_at"`
Summary TestSummary `json:"summary"`
Suites []SuiteOutput `json:"suites"`
}
TestOutput is the JSON envelope for a test report.
Click to show internal directories.
Click to hide internal directories.