getDevicePoolCompatibility method

Future<GetDevicePoolCompatibilityResult> getDevicePoolCompatibility({
  1. required String devicePoolArn,
  2. String? appArn,
  3. ScheduleRunConfiguration? configuration,
  4. ScheduleRunTest? test,
  5. TestType? testType,
})

Gets information about compatibility with a device pool.

May throw ArgumentException. May throw NotFoundException. May throw LimitExceededException. May throw ServiceAccountException.

Parameter devicePoolArn : The device pool's ARN.

Parameter appArn : The ARN of the app that is associated with the specified device pool.

Parameter configuration : An object that contains information about the settings for a run.

Parameter test : Information about the uploaded test to be run against the device pool.

Parameter testType : The test type for the specified device pool.

Allowed values include the following:

  • BUILTIN_FUZZ.
  • BUILTIN_EXPLORER. For Android, an app explorer that traverses an Android app, interacting with it and capturing screenshots at the same time.
  • APPIUM_JAVA_JUNIT.
  • APPIUM_JAVA_TESTNG.
  • APPIUM_PYTHON.
  • APPIUM_NODE.
  • APPIUM_RUBY.
  • APPIUM_WEB_JAVA_JUNIT.
  • APPIUM_WEB_JAVA_TESTNG.
  • APPIUM_WEB_PYTHON.
  • APPIUM_WEB_NODE.
  • APPIUM_WEB_RUBY.
  • CALABASH.
  • INSTRUMENTATION.
  • UIAUTOMATION.
  • UIAUTOMATOR.
  • XCTEST.
  • XCTEST_UI.

Implementation

Future<GetDevicePoolCompatibilityResult> getDevicePoolCompatibility({
  required String devicePoolArn,
  String? appArn,
  ScheduleRunConfiguration? configuration,
  ScheduleRunTest? test,
  TestType? testType,
}) async {
  ArgumentError.checkNotNull(devicePoolArn, 'devicePoolArn');
  _s.validateStringLength(
    'devicePoolArn',
    devicePoolArn,
    32,
    1011,
    isRequired: true,
  );
  _s.validateStringLength(
    'appArn',
    appArn,
    32,
    1011,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DeviceFarm_20150623.GetDevicePoolCompatibility'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'devicePoolArn': devicePoolArn,
      if (appArn != null) 'appArn': appArn,
      if (configuration != null) 'configuration': configuration,
      if (test != null) 'test': test,
      if (testType != null) 'testType': testType.toValue(),
    },
  );

  return GetDevicePoolCompatibilityResult.fromJson(jsonResponse.body);
}