Documentation ¶
Index ¶
- Variables
- func FilterCommit(commit string) filterOption
- func FilterFrom(from time.Time) filterOption
- func FilterFromDaysAgo(days int) filterOption
- func FilterPR(pr string) filterOption
- func FilterTestSuite(testsuite string) filterOption
- func FilterTo(to time.Time) filterOption
- func FilterToDaysAgo(days int) filterOption
- func ImportFromLocalDirectory(dir string) filterOption
- func LoadZippedArtifactsFromDirectory(dir string) ([]artifact, error)
- func RepositoryInfo(owner, name string) filterOption
- func Unzip(src string) ([]byte, error)
- func WaitWaitForQuotaReset(waitForReset bool) filterOption
- func WithTempDownloadDir(tmpDir string) filterOption
- func WithToken(token string) filterOption
- type FlakeReport
- type HtmlFlakeReport
- type HtmlTestDetail
- type HtmlTestEntry
- type TestDetail
- type TestEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorNothingToReport error = errors.New("no error in test to report")
Functions ¶
func FilterCommit ¶
func FilterCommit(commit string) filterOption
func FilterFrom ¶
func FilterFromDaysAgo ¶
func FilterFromDaysAgo(days int) filterOption
func FilterTestSuite ¶
func FilterTestSuite(testsuite string) filterOption
func FilterToDaysAgo ¶
func FilterToDaysAgo(days int) filterOption
func ImportFromLocalDirectory ¶
func ImportFromLocalDirectory(dir string) filterOption
func LoadZippedArtifactsFromDirectory ¶
LoadZippedArtifactsFromDirectory takes the directory of the artifacts and unwraps the zip files in it. Artifact zip files are expected to be in a flat directory. Failed to unwrap an artifact does not stop the entire operation. The results will just not be included in the artifact.
func RepositoryInfo ¶
func RepositoryInfo(owner, name string) filterOption
func WaitWaitForQuotaReset ¶
func WaitWaitForQuotaReset(waitForReset bool) filterOption
func WithTempDownloadDir ¶
func WithTempDownloadDir(tmpDir string) filterOption
WithTempDownloadDir specify the directory where artifacts will be temprarily downloaded for use.
Types ¶
type FlakeReport ¶
type FlakeReport struct { TotalTestCount int `json:"total_test_count"` // All imported test reports FailedTestCount int `json:"failed_test_count"` // All imported test reports have failures FlakeTestCount int `json:"flake_test_count"` // Number of test suit report SkippedTestCount int `json:"skipped_test_count"` // Number of test suit report FlakeTests []TestEntry `json:"flake_tests",omitempty` // Sorted by counts and number of commits SkippedTests []TestEntry `json:"skipped_tests",omitempty` // contains filtered or unexported fields }
func NewFlakeReport ¶
func NewFlakeReport() *FlakeReport
func (*FlakeReport) GenerateReport ¶
func (f *FlakeReport) GenerateReport(outputFile string) ([]byte, error)
GenerateReport sorts the report and converts the tests from map to arrays for print out. It generates a yaml report.
func (*FlakeReport) LoadReport ¶
func (f *FlakeReport) LoadReport(option ...filterOption) error
func (*FlakeReport) PostReportAsPullRequestComment ¶
func (f *FlakeReport) PostReportAsPullRequestComment(option ...filterOption) (*string, error)
type HtmlFlakeReport ¶
type HtmlFlakeReport struct { TotalTestCount int `json:"total_test_count",omitempty` // All imported test reports have failures FailedTestCount int `json:"failed_test_count",omitempty` FlakeTestCount int `json:"flake_test_count",omitempty` // Number of test suit report SkippedTestCount int `json:"skipped_test_count",omitempty` // Number of test suit report FlakeTests []HtmlTestEntry `json:"flake_tests",omitempty` // Sorted by counts and number of commits SkippedTests []HtmlTestEntry `json:"skipped_tests",omitempty` }
type HtmlTestDetail ¶
type HtmlTestEntry ¶
type HtmlTestEntry struct { ClassName string `json:"class_name"` Name string `json:"name"` Counts int `json:"counts"` Details []HtmlTestDetail `json:"details",omitempty` MeanDurationSec float64 `json:"mean_duration_sec"` }
type TestDetail ¶
Click to show internal directories.
Click to hide internal directories.