saucecloud

package
v0.122.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

View Source
const ArchiveFileCountSoftLimit = 32768

ArchiveFileCountSoftLimit is the threshold count of files added to the archive before a warning is printed. The value here (2^15) is somewhat arbitrary. In testing, ~32K files in the archive resulted in about 30s for download and extraction.

View Source
const BaseFilepathLength = 53

BaseFilepathLength represents the path length where project will be unpacked. Example: "D:\sauce-playwright-runner\1.12.0\bundle\__project__\"

View Source
const ConsoleLogAsset = "console.log"

ConsoleLogAsset represents job asset log file name.

View Source
const MaxFilepathLength = 255

MaxFilepathLength represents the maximum path length acceptable.

Variables

View Source
var ErrSuiteCancelled = errors.New("suite cancelled")
View Source
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(restoClient resto.Client, rdcClient rdc.Client, testcompClient testcomposer.Client) *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

func (*ArtifactService) List added in v0.118.0

func (s *ArtifactService) List(jobID string) (artifacts.List, error)

List returns an artifact list

func (*ArtifactService) Upload added in v0.118.0

func (s *ArtifactService) Upload(jobID, filename string, content []byte) error

Upload does upload the specified artifact

type CloudRunner added in v0.25.1

type CloudRunner struct {
	ProjectUploader        storage.AppService
	JobService             job.Service
	CCYReader              concurrency.Reader
	TunnelService          tunnel.Service
	Region                 region.Region
	MetadataService        framework.MetadataService
	ShowConsoleLog         bool
	Framework              framework.Framework
	MetadataSearchStrategy framework.MetadataSearchStrategy
	InsightsService        insights.Service
	UserService            iam.Service

	Reporters []report.Reporter

	Async    bool
	FailFast bool

	NPMDependencies []string
	// contains filtered or unexported fields
}

CloudRunner represents the cloud runner for the Sauce Labs cloud.

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
	ListArtifacts(ctx context.Context, id string) ([]string, error)
	DownloadArtifact(ctx context.Context, id, name, dir string) error
	GetLogs(ctx context.Context, id string) (string, error)
}

type ImgRunner added in v0.121.0

type ImgRunner struct {
	Project       imagerunner.Project
	RunnerService ImageRunner

	Reporters []report.Reporter
	// contains filtered or unexported fields
}

func (*ImgRunner) DownloadArtifacts added in v0.122.0

func (r *ImgRunner) DownloadArtifacts(runnerID, suiteName string)

func (*ImgRunner) PollLogs added in v0.122.0

func (r *ImgRunner) PollLogs(ctx context.Context, id string) (string, error)

func (*ImgRunner) PollRun added in v0.121.0

func (r *ImgRunner) PollRun(ctx context.Context, id string, lastStatus string) (imagerunner.Runner, error)

func (*ImgRunner) PrintLogs added in v0.122.0

func (r *ImgRunner) PrintLogs(runID, suiteName string)

func (*ImgRunner) RunProject added in v0.121.0

func (r *ImgRunner) RunProject() (int, error)

type JobCommandService added in v0.120.0

type JobCommandService struct {
	Reader      insights.Service
	UserService iam.Service
}

func (JobCommandService) ListJobs added in v0.120.0

func (s JobCommandService) ListJobs(ctx context.Context, jobSource string, queryOption cjob.QueryOption) (cjob.List, error)

func (JobCommandService) ReadJob added in v0.120.0

func (s JobCommandService) ReadJob(ctx context.Context, id string) (cjob.Job, error)

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

	VDCDownloader job.ArtifactDownloader
	RDCDownloader job.ArtifactDownloader
}

func (JobService) DownloadArtifact added in v0.99.2

func (s JobService) DownloadArtifact(jobID, suiteName string, realDevice bool) []string

func (JobService) GetJobAssetFileContent added in v0.99.2

func (s JobService) GetJobAssetFileContent(ctx context.Context, jobID, fileName string, realDevice bool) ([]byte, error)

func (JobService) GetJobAssetFileNames added in v0.99.2

func (s JobService) GetJobAssetFileNames(ctx context.Context, jobID string, realDevice bool) ([]string, error)

func (JobService) PollJob added in v0.99.2

func (s JobService) PollJob(ctx context.Context, id string, interval, timeout time.Duration, realDevice bool) (job.Job, error)

func (JobService) ReadJob added in v0.99.2

func (s JobService) ReadJob(ctx context.Context, id string, realDevice bool) (job.Job, error)

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) StopJob added in v0.99.2

func (s JobService) StopJob(ctx context.Context, jobID string, realDevice bool) (job.Job, error)

func (JobService) UploadAsset added in v0.99.2

func (s JobService) UploadAsset(jobID string, realDevice bool, fileName string, contentType string, content []byte) error

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

type SuiteTimeoutError struct {
	Timeout time.Duration
}

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.

Jump to

Keyboard shortcuts

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