service

package
v0.0.0-...-700aa5c Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const UploadARN = "wefere3f3f33gv3fre3f3f3f3f3v34v3v43v433v34v43v34"

UploadARN using for tests

Variables

This section is empty.

Functions

func CreateFakeServer

func CreateFakeServer() *httptest.Server

CreateFakeServer creates a fake server for tests

Types

type DeviceFarmRun

type DeviceFarmRun struct {
	Client     devicefarmiface.DeviceFarmAPI
	Config     *model.RunConfig
	Project    string
	ProjectArn string
	DeviceArn  string
	AppArn     string
}

DeviceFarmRun represents parameters for utility runtime

func (*DeviceFarmRun) CreateUpload

func (p *DeviceFarmRun) CreateUpload(appPath string) (string, string)

CreateUpload creates pre-signed S3 URL for upload

func (*DeviceFarmRun) CreateUploadWithType

func (p *DeviceFarmRun) CreateUploadWithType(arn, appPath, uploadType string) (string, string)

CreateUploadWithType creates upload with specific type

func (*DeviceFarmRun) GetDevicePoolArn

func (p *DeviceFarmRun) GetDevicePoolArn(devicePool string) string

GetDevicePoolArn returns device pool ARN by device pool name

func (*DeviceFarmRun) GetListOfFailedTests

func (p *DeviceFarmRun) GetListOfFailedTests(arn string) []*model.FailedTest

GetListOfFailedTests returns list of failed test for a specified run with additional info

func (*DeviceFarmRun) GetProjectArn

func (p *DeviceFarmRun) GetProjectArn() string

GetProjectArn returns project ARN by project name

func (*DeviceFarmRun) GetStatusOfRun

func (p *DeviceFarmRun) GetStatusOfRun(arn string) (string, string)

GetStatusOfRun returns status and result of run specified by ARN

func (*DeviceFarmRun) GetUploadStatus

func (p *DeviceFarmRun) GetUploadStatus(arn string) string

GetUploadStatus returns status of upload file

func (*DeviceFarmRun) IsTestRunPassIgnoringUnavailableDevices

func (p *DeviceFarmRun) IsTestRunPassIgnoringUnavailableDevices(arn string) bool

IsTestRunPassIgnoringUnavailableDevices checks if there was a situation then test runs on some devices passes, but some devices weren't available. In this case it returns 'true', otherwise 'false'

func (*DeviceFarmRun) RunWithConfig

func (p *DeviceFarmRun) RunWithConfig() (string, string)

RunWithConfig will schedule run with setup from JSON model

func (*DeviceFarmRun) SelectDevicePool

func (p *DeviceFarmRun) SelectDevicePool(arn string) string

SelectDevicePool checking for unused at the moment device pools and randomly selects one

func (*DeviceFarmRun) WaitForAppProcessed

func (p *DeviceFarmRun) WaitForAppProcessed(arn string, timeout int)

WaitForAppProcessed wait while app be in status "SUCCEEDED"

func (*DeviceFarmRun) WaitForRunEnds

func (p *DeviceFarmRun) WaitForRunEnds(arn string, checkEvery int) string

WaitForRunEnds for run to finish and returns it's result

type MockClient

type MockClient struct {
	devicefarmiface.DeviceFarmAPI
	Failed                  bool
	UploadTest              bool
	AWSFail                 bool
	PartlyUnavailableDevice bool
	FullUnavailableDevices  bool
	FakeServer              *httptest.Server
}

MockClient mock for AWS Device Farm API

func (*MockClient) CreateUpload

func (*MockClient) GetRun

func (*MockClient) GetUpload

func (*MockClient) ListArtifacts

func (*MockClient) ListJobs

func (*MockClient) ListProjects

func (*MockClient) ListSuites

func (*MockClient) ListTests

func (*MockClient) ScheduleRun

Jump to

Keyboard shortcuts

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