saucecloud

package
v0.189.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 53 Imported by: 0

Documentation

Index

Constants

View Source
const ConsoleLogAsset = "console.log"

ConsoleLogAsset represents job asset log file name.

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 Cache added in v0.165.0

type Cache struct {
	VDCBuild *build.Build
	RDCBuild *build.Build
}

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.Service
	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

func (r *ImgRunner) DownloadArtifacts(runnerID, suiteName, status string, passed bool) []string

DownloadArtifacts downloads a zipped archive of artifacts and extracts the required files.

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) PrintResult added in v0.164.1

func (r *ImgRunner) PrintResult(res execResult)

func (*ImgRunner) RunProject added in v0.121.0

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

type JobService added in v0.99.2

type JobService struct {
	RDC          http.RDCService
	Resto        http.Resto
	Webdriver    http.Webdriver
	TestComposer http.TestComposer

	ArtifactDownloadConfig config.ArtifactDownload
}

func (JobService) Artifact added in v0.186.4

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

func (JobService) ArtifactNames added in v0.186.4

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

func (JobService) DownloadArtifacts added in v0.186.4

func (s JobService) DownloadArtifacts(
	jobData job.Job, isLastAttempt bool,
) []string

func (JobService) Job added in v0.186.4

func (s JobService) Job(ctx context.Context, id string, realDevice bool) (job.Job, 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) StartJob added in v0.99.2

func (s JobService) StartJob(ctx context.Context, opts job.StartOptions) (job.Job, 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) UploadArtifact added in v0.186.4

func (s JobService) UploadArtifact(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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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