Documentation ¶
Index ¶
Constants ¶
View Source
const ( StateNew = "new" StateQueued = "queued" StateInProgress = "in progress" StateComplete = "complete" StateError = "error" )
The different states that a job can be in.
Variables ¶
View Source
var DoneStates = []string{StateComplete, StateError}
DoneStates represents states that a job doesn't transition out of, i.e. once the job is in one of these states, it's done.
Functions ¶
Types ¶
type Job ¶ added in v0.21.1
type Job struct { ID string `json:"id"` Passed bool `json:"passed"` Status string `json:"status"` Error string `json:"error"` }
Job represents test details and metadata of a test run (aka Job), that is usually associated with a particular test execution instance (e.g. VM).
type Reader ¶ added in v0.21.1
type Reader interface { // ReadJob returns the job details. ReadJob(ctx context.Context, id string) (Job, error) // PollJob polls job details at an interval, until the job has ended, whether successfully or due to an error. PollJob(ctx context.Context, id string, interval time.Duration) (Job, error) // GetJobAssetFileContent returns the job asset file content. GetJobAssetFileContent(ctx context.Context, jobID, fileName string) ([]byte, error) }
Reader is the interface for retrieving jobs.
type StartOptions ¶
type StartOptions struct { User string `json:"username"` AccessKey string `json:"accessKey"` App string `json:"app,omitempty"` Suite string `json:"suite,omitempty"` Framework string `json:"framework,omitempty"` // FrameworkVersion contains the targeted version of the framework // It should not be confused with automation tool (like jest/folio). // This is currenty supported only for frameworks available on Sauce Cloud: // Currently supported: Cypress. FrameworkVersion string `json:"frameworkVersion,omitempty"` BrowserName string `json:"browserName,omitempty"` BrowserVersion string `json:"browserVersion,omitempty"` PlatformName string `json:"platformName,omitempty"` Name string `json:"name,omitempty"` Build string `json:"build,omitempty"` Tags []string `json:"tags,omitempty"` Tunnel TunnelOptions `json:"tunnel,omitempty"` ScreenResolution string `json:"screenResolution,omitempty"` }
StartOptions represents the options for starting a job in the Sauce Labs cloud.
type Starter ¶
type Starter interface { StartJob(ctx context.Context, opts StartOptions) (jobID string, err error) CheckFrameworkAvailability(ctx context.Context, frameworkName string) error }
Starter is the interface for starting jobs.
type TunnelOptions ¶ added in v0.22.0
TunnelOptions represents the options that configure the usage of a tunnel when running tests in the Sauce Labs cloud.
Click to show internal directories.
Click to hide internal directories.