@@ -8,43 +8,44 @@ import (
88 "time"
99)
1010
11- // Data Structures
12-
11+ // TestReport reports on the parameters and results of one to many test runs
1312type TestReport struct {
14- GoProject string
15- HeadSHA string
16- BaseSHA string
17- RepoURL string
18- GitHubWorkflowName string
19- TestRunCount int
20- RaceDetection bool
21- ExcludedTests []string
22- SelectedTests []string
23- Results []TestResult
13+ GoProject string `json:"go_project"`
14+ HeadSHA string `json:"head_sha"`
15+ BaseSHA string `json:"base_sha"`
16+ RepoURL string `json:"repo_url"`
17+ GitHubWorkflowName string `json:"github_workflow_name"`
18+ TestRunCount int `json:"test_run_count"`
19+ RaceDetection bool `json:"race_detection"`
20+ ExcludedTests []string `json:"excluded_tests"`
21+ SelectedTests []string `json:"selected_tests"`
22+ Results []TestResult `json:"results"`
2423}
2524
25+ // TestResult contains the results and outputs of a single test
2626type TestResult struct {
27- TestName string
28- TestPackage string
29- PackagePanic bool
30- Panic bool
31- Timeout bool
32- Race bool
33- Skipped bool
34- PassRatio float64
35- Runs int
36- Failures int
37- Successes int
38- Skips int
39- Outputs map [string ][]string `json:"-"` // Temporary storage for outputs during test run
40- PassedOutputs map [string ][]string // Outputs for passed runs
41- FailedOutputs map [string ][]string // Outputs for failed runs
42- Durations []time.Duration
43- PackageOutputs []string
44- TestPath string
45- CodeOwners []string
27+ TestName string `json:"test_name"`
28+ TestPackage string `json:"test_package"`
29+ PackagePanic bool `json:"package_panic"`
30+ Panic bool `json:"panic"`
31+ Timeout bool `json:"timeout"`
32+ Race bool `json:"race"`
33+ Skipped bool `json:"skipped"`
34+ PassRatio float64 `json:"pass_ratio"`
35+ Runs int `json:"runs"`
36+ Failures int `json:"failures"`
37+ Successes int `json:"successes"`
38+ Skips int `json:"skips"`
39+ Outputs map [string ][]string `json:"-"` // Temporary storage for outputs during test run
40+ PassedOutputs map [string ][]string `json:"passed_outputs"` // Outputs for passed runs
41+ FailedOutputs map [string ][]string `json:"failed_outputs"` // Outputs for failed runs
42+ Durations []time.Duration `json:"durations"`
43+ PackageOutputs []string `json:"package_outputs"`
44+ TestPath string `json:"test_path"`
45+ CodeOwners []string `json:"code_owners"`
4646}
4747
48+ // SummaryData contains aggregated data from a set of test results
4849type SummaryData struct {
4950 TotalTests int `json:"total_tests"`
5051 PanickedTests int `json:"panicked_tests"`
0 commit comments