Documentation ¶
Index ¶
- Constants
- func CreateFakeServer() *httptest.Server
- type DeviceFarmRun
- func (p *DeviceFarmRun) CreateUpload(appPath string) (string, string)
- func (p *DeviceFarmRun) CreateUploadWithType(arn, appPath, uploadType string) (string, string)
- func (p *DeviceFarmRun) GetDevicePoolArn(devicePool string) string
- func (p *DeviceFarmRun) GetListOfFailedTests(arn string) []*model.FailedTest
- func (p *DeviceFarmRun) GetProjectArn() string
- func (p *DeviceFarmRun) GetStatusOfRun(arn string) (string, string)
- func (p *DeviceFarmRun) GetUploadStatus(arn string) string
- func (p *DeviceFarmRun) IsTestRunPassIgnoringUnavailableDevices(arn string) bool
- func (p *DeviceFarmRun) RunWithConfig() (string, string)
- func (p *DeviceFarmRun) SelectDevicePool(arn string) string
- func (p *DeviceFarmRun) WaitForAppProcessed(arn string, timeout int)
- func (p *DeviceFarmRun) WaitForRunEnds(arn string, checkEvery int) string
- type MockClient
- func (c *MockClient) CreateUpload(*devicefarm.CreateUploadInput) (*devicefarm.CreateUploadOutput, error)
- func (c *MockClient) GetRun(*devicefarm.GetRunInput) (*devicefarm.GetRunOutput, error)
- func (c *MockClient) GetUpload(input *devicefarm.GetUploadInput) (*devicefarm.GetUploadOutput, error)
- func (c *MockClient) ListArtifacts(input *devicefarm.ListArtifactsInput) (*devicefarm.ListArtifactsOutput, error)
- func (c *MockClient) ListDevicePools(*devicefarm.ListDevicePoolsInput) (*devicefarm.ListDevicePoolsOutput, error)
- func (c *MockClient) ListJobs(input *devicefarm.ListJobsInput) (*devicefarm.ListJobsOutput, error)
- func (c *MockClient) ListProjects(*devicefarm.ListProjectsInput) (*devicefarm.ListProjectsOutput, error)
- func (c *MockClient) ListSuites(*devicefarm.ListSuitesInput) (*devicefarm.ListSuitesOutput, error)
- func (c *MockClient) ListTests(input *devicefarm.ListTestsInput) (*devicefarm.ListTestsOutput, error)
- func (c *MockClient) ScheduleRun(*devicefarm.ScheduleRunInput) (*devicefarm.ScheduleRunOutput, error)
Constants ¶
const UploadARN = "wefere3f3f33gv3fre3f3f3f3f3v34v3v43v433v34v43v34"
UploadARN using for tests
Variables ¶
This section is empty.
Functions ¶
func CreateFakeServer ¶
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 FakeServer *httptest.Server }
MockClient mock for AWS Device Farm API
func (*MockClient) CreateUpload ¶
func (c *MockClient) CreateUpload(*devicefarm.CreateUploadInput) (*devicefarm.CreateUploadOutput, error)
func (*MockClient) GetRun ¶
func (c *MockClient) GetRun(*devicefarm.GetRunInput) (*devicefarm.GetRunOutput, error)
func (*MockClient) GetUpload ¶
func (c *MockClient) GetUpload(input *devicefarm.GetUploadInput) (*devicefarm.GetUploadOutput, error)
func (*MockClient) ListArtifacts ¶
func (c *MockClient) ListArtifacts(input *devicefarm.ListArtifactsInput) (*devicefarm.ListArtifactsOutput, error)
func (*MockClient) ListDevicePools ¶
func (c *MockClient) ListDevicePools(*devicefarm.ListDevicePoolsInput) (*devicefarm.ListDevicePoolsOutput, error)
func (*MockClient) ListJobs ¶
func (c *MockClient) ListJobs(input *devicefarm.ListJobsInput) (*devicefarm.ListJobsOutput, error)
func (*MockClient) ListProjects ¶
func (c *MockClient) ListProjects(*devicefarm.ListProjectsInput) (*devicefarm.ListProjectsOutput, error)
func (*MockClient) ListSuites ¶
func (c *MockClient) ListSuites(*devicefarm.ListSuitesInput) (*devicefarm.ListSuitesOutput, error)
func (*MockClient) ListTests ¶
func (c *MockClient) ListTests(input *devicefarm.ListTestsInput) (*devicefarm.ListTestsOutput, error)
func (*MockClient) ScheduleRun ¶
func (c *MockClient) ScheduleRun(*devicefarm.ScheduleRunInput) (*devicefarm.ScheduleRunOutput, error)