Documentation ¶
Index ¶
- Constants
- Variables
- type ArtifactService
- type Cache
- type CloudRunner
- type CucumberRunner
- type CypressRunner
- type EspressoRunner
- type ImageRunner
- type ImgRunner
- func (r *ImgRunner) DownloadArtifacts(runnerID, suiteName, status string, passed bool) []string
- func (r *ImgRunner) PollLogs(ctx context.Context, id string) (string, error)
- func (r *ImgRunner) PollRun(ctx context.Context, id string, lastStatus string) (imagerunner.Runner, error)
- func (r *ImgRunner) PrintLogs(runID, suiteName string)
- func (r *ImgRunner) PrintResult(res execResult)
- func (r *ImgRunner) RunProject() (int, error)
- type JobService
- func (s JobService) DownloadArtifact(jobData job.Job, attemptNumber int, retries int) []string
- func (s JobService) GetJobAssetFileContent(ctx context.Context, jobID, fileName string, realDevice bool) ([]byte, error)
- func (s JobService) GetJobAssetFileNames(ctx context.Context, jobID string, realDevice bool) ([]string, error)
- func (s JobService) PollJob(ctx context.Context, id string, interval, timeout time.Duration, ...) (job.Job, error)
- func (s JobService) ReadJob(ctx context.Context, id string, realDevice bool) (job.Job, error)
- func (s JobService) StartJob(ctx context.Context, opts job.StartOptions) (jobID string, isRDC bool, err error)
- func (s JobService) StopJob(ctx context.Context, jobID string, realDevice bool) (job.Job, error)
- func (s JobService) UploadAsset(jobID string, realDevice bool, fileName string, contentType string, ...) error
- type PlaywrightRunner
- type ReplayRunner
- type SuiteTimeoutError
- type TestcafeRunner
- type XcuitestRunner
Constants ¶
const ConsoleLogAsset = "console.log"
ConsoleLogAsset represents job asset log file name.
Variables ¶
var ErrSuiteCancelled = errors.New("suite cancelled")
var PlaywrightBrowserMap = map[string]string{
"chromium": "playwright-chromium",
"firefox": "playwright-firefox",
"webkit": "playwright-webkit",
}
Functions ¶
This section is empty.
Types ¶
type ArtifactService ¶ added in v0.118.0
type ArtifactService struct {
JobService
}
ArtifactService represents artifact service
func NewArtifactService ¶ added in v0.118.0
func NewArtifactService(vdcReader job.Reader, rdcReader job.Reader, vdcWriter job.Writer) *ArtifactService
NewArtifactService returns an artifact service
func (*ArtifactService) Download ¶ added in v0.118.0
func (s *ArtifactService) Download(jobID, filename string) ([]byte, error)
Download does download specified artifacts
type CloudRunner ¶ added in v0.25.1
type CloudRunner struct { ProjectUploader storage.AppService JobService job.Service TunnelService tunnel.Service Region region.Region MetadataService framework.MetadataService ShowConsoleLog bool Framework framework.Framework MetadataSearchStrategy framework.MetadataSearchStrategy InsightsService insights.Service UserService iam.UserService BuildService build.Reader Retrier retry.Retrier Reporters []report.Reporter Async bool FailFast bool NPMDependencies []string Cache Cache // contains filtered or unexported fields }
CloudRunner represents the cloud runner for the Sauce Labs cloud.
func (*CloudRunner) FetchJUnitReports ¶ added in v0.156.0
func (r *CloudRunner) FetchJUnitReports(res *result, artifacts []report.Artifact)
FetchJUnitReports retrieves junit reports for the given result and all of its attempts. Can use the given artifacts to avoid unnecessary API calls.
type CucumberRunner ¶ added in v0.109.0
type CucumberRunner struct { CloudRunner Project cucumber.Project }
CucumberRunner represents the SauceLabs cloud implementation
func (*CucumberRunner) RunProject ¶ added in v0.109.0
func (r *CucumberRunner) RunProject() (int, error)
RunProject runs the defined tests on sauce cloud
type CypressRunner ¶
type CypressRunner struct { CloudRunner Project cypress.Project }
CypressRunner represents the Sauce Labs cloud implementation for cypress.
func (*CypressRunner) RunProject ¶
func (r *CypressRunner) RunProject() (int, error)
RunProject runs the tests defined in cypress.Project.
type EspressoRunner ¶ added in v0.36.0
type EspressoRunner struct { CloudRunner Project espresso.Project }
EspressoRunner represents the Sauce Labs cloud implementation for cypress.
func (*EspressoRunner) RunProject ¶ added in v0.36.0
func (r *EspressoRunner) RunProject() (int, error)
RunProject runs the tests defined in cypress.Project.
type ImageRunner ¶ added in v0.121.0
type ImageRunner interface { TriggerRun(context.Context, imagerunner.RunnerSpec) (imagerunner.Runner, error) GetStatus(ctx context.Context, id string) (imagerunner.Runner, error) StopRun(ctx context.Context, id string) error DownloadArtifacts(ctx context.Context, id string) (io.ReadCloser, error) GetLogs(ctx context.Context, id string) (string, error) StreamLiveLogs(ctx context.Context, id string, wait bool) error GetLiveLogs(ctx context.Context, id string) error }
type ImgRunner ¶ added in v0.121.0
type ImgRunner struct { Project imagerunner.Project RunnerService ImageRunner TunnelService tunnel.Service Reporters []report.Reporter Async bool AsyncEventManager imagerunner.AsyncEventManager // contains filtered or unexported fields }
func NewImgRunner ¶ added in v0.171.0
func NewImgRunner(project imagerunner.Project, runnerService ImageRunner, tunnelService tunnel.Service, asyncEventManager imagerunner.AsyncEventManager, reporters []report.Reporter, async bool) *ImgRunner
func (*ImgRunner) DownloadArtifacts ¶ added in v0.122.0
DownloadArtifacts downloads a zipped archive of artifacts and extracts the required files.
func (*ImgRunner) PrintResult ¶ added in v0.164.1
func (r *ImgRunner) PrintResult(res execResult)
func (*ImgRunner) RunProject ¶ added in v0.121.0
type JobService ¶ added in v0.99.2
type JobService struct { VDCStarter job.Starter RDCStarter job.Starter VDCReader job.Reader RDCReader job.Reader VDCWriter job.Writer VDCStopper job.Stopper RDCStopper job.Stopper VDCDownloader job.ArtifactDownloader RDCDownloader job.ArtifactDownloader }
func (JobService) DownloadArtifact ¶ added in v0.99.2
func (JobService) GetJobAssetFileContent ¶ added in v0.99.2
func (JobService) GetJobAssetFileNames ¶ added in v0.99.2
func (JobService) StartJob ¶ added in v0.99.2
func (s JobService) StartJob(ctx context.Context, opts job.StartOptions) (jobID string, isRDC bool, err error)
func (JobService) UploadAsset ¶ added in v0.99.2
type PlaywrightRunner ¶
type PlaywrightRunner struct { CloudRunner Project playwright.Project }
PlaywrightRunner represents the Sauce Labs cloud implementation for playwright.
func (*PlaywrightRunner) RunProject ¶
func (r *PlaywrightRunner) RunProject() (int, error)
RunProject runs the tests defined in cypress.Project.
type ReplayRunner ¶ added in v0.93.0
type ReplayRunner struct { CloudRunner Project replay.Project }
ReplayRunner represents the Sauce Labs cloud implementation for puppeteer-replay.
func (*ReplayRunner) RunProject ¶ added in v0.93.0
func (r *ReplayRunner) RunProject() (int, error)
RunProject runs the tests defined in cypress.Project.
type SuiteTimeoutError ¶ added in v0.121.0
func (SuiteTimeoutError) Error ¶ added in v0.121.0
func (s SuiteTimeoutError) Error() string
type TestcafeRunner ¶ added in v0.31.0
type TestcafeRunner struct { CloudRunner Project testcafe.Project }
TestcafeRunner represents the SauceLabs cloud implementation
func (*TestcafeRunner) RunProject ¶ added in v0.31.0
func (r *TestcafeRunner) RunProject() (int, error)
RunProject runs the defined tests on sauce cloud
type XcuitestRunner ¶ added in v0.44.0
type XcuitestRunner struct { CloudRunner Project xcuitest.Project }
XcuitestRunner represents the Sauce Labs cloud implementation for xcuitest.
func (*XcuitestRunner) RunProject ¶ added in v0.44.0
func (r *XcuitestRunner) RunProject() (int, error)
RunProject runs the tests defined in xcuitest.Project.