sylph library

Classes

DeviceFarmDevice
Describe a device farm device that can be compared and sorted. Also can be compared with a SylphDevice.
SylphDevice
Describe a sylph device that can be compared and sorted.

Constants

kCompletedRunStatus → const String
'COMPLETED'
kDebugApkPath → const String
'build/app/outputs/apk/debug/app-debug.apk'
kDebugIpaPath → const String
'build/ios/Debug-iphoneos/Debug_Runner.ipa'
kOrderEqual → const int
0
kSuccessResult → const String
'PASSED'
kUploadFailed → const String
'FAILED'
kUploadSucceeded → const String
'SUCCEEDED'
kUploadTimeout → const int
15

Functions

devicesToRule(List<SylphDevice> sylphDevices) String
Converts a List of sylph devices to a rule. Used for building a device pool. Returns rule as formatted String.
downloadArtifacts(String arn, String artifactsDir) → void
Downloads artifacts generated during a run. arn can be a run, job, suite, or test ARN.
downloadJobArtifacts(String runArn, String runArtifactDir) → void
Downloads artifacts for each job generated during a run.
findDevicesArns(List<SylphDevice> sylphDevices) List
Finds the ARNs of devices for a List of sylph devices. Returns device ARNs as a List.
getDeviceFarmDevices() List<DeviceFarmDevice>
Get current device farm devices using device farm API.
getDeviceFarmDevicesByType(DeviceType deviceType) List<DeviceFarmDevice>
Get device farm devices filtered by type.
jobArtifactsDirPath(String runArtifactDir, SylphDevice sylphDevice) String
generates a download directory path for each Device Farm run job's artifacts
jobStatus(Map job) String
Generates string of job status info from a Map of job info
loadDeviceFarmDevice(Map device) DeviceFarmDevice
Load a device farm device from a Map of device.
loadSylphDevice(Map device, String poolType) SylphDevice
Load a sylph device from Map of device and pool type.
packArgs(TestSuite testSuite, Config config, dynamic poolName, String projectArn, String sylphRunName, int sylphRunTimeout, bool jobVerbose) Map<String, dynamic>
Pack runSylphJob args into Map.
runInContext<T>(FutureOr<T> runner(), {Map<Type, Generator> overrides}) Future<T>
runReport(Map run) bool
Runs run report. Returns bool for pass/fail of run.
runStatus(String runArn, int sylphRunTimeout, String poolName) Future<Map>
Tracks run status. Returns final run status as Map.
runSylphJob(TestSuite testSuite, Config config, dynamic poolName, String projectArn, String sylphRunName, int sylphRunTimeout) Future<bool>
Run sylph tests on a pool of devices using a device farm run.
runSylphJobInIsolate(Map args) Future<Map>
Runs runSylphJob in an isolate. Function signature must match JobFunction.
scheduleRun(String runName, String projectArn, String appArn, String devicePoolArn, String testSpecArn, String testPackageArn, int runTimeout) String
Schedules a run. Returns the run ARN as String.
setTestSpecEnv(TestSuite test_suite, String testSpecPath) → void
Set MAIN and TESTS env vars in test spec.
setupDevicePool(DevicePool devicePool, String projectArn) String
Set up a device pool if named pool does not exist. Returns the device pool ARN as String.
setupProject(String projectName, int jobTimeoutMinutes) String
Sets up a project for testing. Creates new project if none exists. Returns the project ARN as String.
sylphRun(String configFilePath, String sylphRunName, DateTime sylphRunTimestamp, bool jobVerbose, {String configStr}) Future<bool>
Processes config file (subject to change). For each device pool: [...]
sylphRuntimeFormatted(DateTime startTime, DateTime endTime) String
Formats the sylph runtime, rounded to milliseconds.
sylphTimestamp() DateTime
Generates timestamp as DateTime in milliseconds
uploadFile(String projectArn, String filePath, String fileType) Future<String>
Uploads a file to device farm. Returns file ARN as String.

Enums

DeviceType
FormFactor