testcomposer

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignerRequest

type AssignerRequest struct {
	SuiteName string `json:"suiteName"`
}

AssignerRequest represents the request body for fleet assignments.

type AssignerResponse

type AssignerResponse struct {
	TestFile string `json:"testFile"`
}

AssignerResponse represents the response body for fleet assignments.

type Client

type Client struct {
	HTTPClient  *http.Client
	URL         string // e.g.) https://api.<region>.saucelabs.net
	Credentials credentials.Credentials
}

Client service

func (*Client) NextAssignment

func (c *Client) NextAssignment(ctx context.Context, fleetID, suiteName string) (string, error)

NextAssignment fetches the next test assignment based on the suiteName and fleetID. Returns an empty string if all tests have been assigned.

func (*Client) Register

func (c *Client) Register(ctx context.Context, buildID string, testSuites []fleet.TestSuite) (string, error)

Register registers a fleet with the given buildID and test suites. Returns a fleet ID if successful.

func (*Client) StartJob

func (c *Client) StartJob(ctx context.Context, jobStarterPayload JobStarterPayload) (jobID string, err error)

StartJob creates a new job in Sauce Labs.

type CreatorRequest

type CreatorRequest struct {
	BuildID    string            `json:"buildID"`
	TestSuites []fleet.TestSuite `json:"testSuites"`
}

CreatorRequest represents the request body for creating a fleet.

type CreatorResponse

type CreatorResponse struct {
	FleetID string `json:"fleetID"`
}

CreatorResponse represents the response body for creating a fleet.

type Job

type Job struct {
	ID    string `json:"id"`
	Owner string `json:"owner"`
}

Job represents the sauce labs test job.

type JobStarterPayload

type JobStarterPayload struct {
	User        string   `json:"username"`
	AccessKey   string   `json:"accessKey"`
	BrowserName string   `json:"browserName,omitempty"`
	TestName    string   `json:"testName,omitempty"`
	Framework   string   `json:"framework,omitempty"`
	BuildName   string   `json:"buildName,omitempty"`
	Tags        []string `json:"tags,omitempty"`
}

JobStarterPayload is a JSON object of parameters used to start a session from saucectl

Jump to

Keyboard shortcuts

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