jobruntestcaseanalyzer

package
v0.0.0-...-f76c2c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJobRunsTestCaseAnalyzerCommand

func NewJobRunsTestCaseAnalyzerCommand() *cobra.Command

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

GetRelatedJobRuns gets all related job runs for analysis

func (*JobRunTestCaseAnalyzerOptions) GetRelatedJobRunsFromIdentifiers

func (o *JobRunTestCaseAnalyzerOptions) GetRelatedJobRunsFromIdentifiers(ctx context.Context, jobRunIdentifiers []jobrunaggregatorlib.JobRunIdentifier) ([]jobrunaggregatorapi.JobRunInfo, error)

func (*JobRunTestCaseAnalyzerOptions) Run

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL