Documentation ¶
Index ¶
- func NewJobRunsTestCaseAnalyzerCommand() *cobra.Command
- func NewTestCaseAnalyzerJobGetter(platform, infrastructure, network, testNameSuffix string, ...) *testCaseAnalyzerJobGetter
- type JobGetter
- type JobRunTestCaseAnalyzerOptions
- func (o *JobRunTestCaseAnalyzerOptions) GetRelatedJobRuns(ctx context.Context) ([]jobrunaggregatorapi.JobRunInfo, error)
- func (o *JobRunTestCaseAnalyzerOptions) GetRelatedJobRunsFromIdentifiers(ctx context.Context, jobRunIdentifiers []jobrunaggregatorlib.JobRunIdentifier) ([]jobrunaggregatorapi.JobRunInfo, error)
- func (o *JobRunTestCaseAnalyzerOptions) Run(ctx context.Context) error
- type JobRunsTestCaseAnalyzerFlags
- type TestCaseChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestCaseAnalyzerJobGetter ¶
func NewTestCaseAnalyzerJobGetter(platform, infrastructure, network, testNameSuffix string, excludeJobNames, includeJobNames []string, jobGCSPrefixes *[]jobGCSPrefix, ciDataClient jobrunaggregatorlib.CIDataClient) *testCaseAnalyzerJobGetter
Types ¶
type JobGetter ¶
type JobGetter interface {
GetJobs(ctx context.Context) ([]jobrunaggregatorapi.JobRowWithVariants, error)
}
JobGetter gets related jobs for further analysis
type JobRunTestCaseAnalyzerOptions ¶
type JobRunTestCaseAnalyzerOptions struct {
// contains filtered or unexported fields
}
JobRunTestCaseAnalyzerOptions 1. either gets a list of jobs from big query that meet the passed criteria: platform, network, or uses the passed jobs 2. finds job runs for matching jobs for the specified payload tag 3. runs all test case checkers and constructs a synthetic junit
func (*JobRunTestCaseAnalyzerOptions) GetRelatedJobRuns ¶
func (o *JobRunTestCaseAnalyzerOptions) GetRelatedJobRuns(ctx context.Context) ([]jobrunaggregatorapi.JobRunInfo, error)
GetRelatedJobRuns gets all related job runs for analysis
func (*JobRunTestCaseAnalyzerOptions) GetRelatedJobRunsFromIdentifiers ¶
func (o *JobRunTestCaseAnalyzerOptions) GetRelatedJobRunsFromIdentifiers(ctx context.Context, jobRunIdentifiers []jobrunaggregatorlib.JobRunIdentifier) ([]jobrunaggregatorapi.JobRunInfo, error)
type JobRunsTestCaseAnalyzerFlags ¶
type JobRunsTestCaseAnalyzerFlags struct { DataCoordinates *jobrunaggregatorlib.BigQueryDataCoordinates Authentication *jobrunaggregatorlib.GoogleAuthenticationFlags TestGroup string WorkingDir string PayloadTag string Timeout time.Duration EstimatedJobStartTimeString string Platform string Infrastructure string Network string MinimumSuccessfulTestCount int PayloadInvocationID string JobGCSPrefixes []jobGCSPrefix ExcludeJobNames []string IncludeJobNames []string JobStateQuerySource string StaticJobRunIdentifierPath string StaticJobRunIdentifierJSON string GCSBucket string }
func NewJobRunsTestCaseAnalyzerFlags ¶
func NewJobRunsTestCaseAnalyzerFlags() *JobRunsTestCaseAnalyzerFlags
func (*JobRunsTestCaseAnalyzerFlags) BindFlags ¶
func (f *JobRunsTestCaseAnalyzerFlags) BindFlags(fs *pflag.FlagSet)
func (*JobRunsTestCaseAnalyzerFlags) ToOptions ¶
func (f *JobRunsTestCaseAnalyzerFlags) ToOptions(ctx context.Context) (*JobRunTestCaseAnalyzerOptions, error)
ToOptions creates a new JobRunTestCaseAnalyzerOptions struct
func (*JobRunsTestCaseAnalyzerFlags) Validate ¶
func (f *JobRunsTestCaseAnalyzerFlags) Validate() error
Validate checks to see if the user-input is likely to produce functional runtime options
type TestCaseChecker ¶
type TestCaseChecker interface { // CheckTestCase returns a test suite based on whether a test has passed certain criteria across job runs CheckTestCase(ctx context.Context, jobRunJunits map[jobrunaggregatorapi.JobRunInfo]*junit.TestSuites) *junit.TestSuite }
TestCaseChecker checks if a test passes certain criteria across all job runs
Click to show internal directories.
Click to hide internal directories.