Ruby aws 设备群在调用 schedule_run 方法时抛出参数错误

问题描述

我正在尝试使用 aws 设备群 sdk 安排运行,我已按照文档进行操作,但是,每次调用 schedule_run 方法时,我都会收到此错误Aws::DeviceFarm::Errors::ArgumentException: Missing or unprocessed resources

这是我调用 schedule_run 的方法

def schedule_run
aws_client.schedule_run({
project_arn: ANDROID_PROJECT_ARN,# required
app_arn: get_uploads_by_name(ANDROID_APP,'ANDROID_APP').arn,device_pool_arn: get_device_pool_by_name('Android test decive pool').arn,device_selection_configuration: nil,name: "test_run",test: { # required
type: "APPIUM_RUBY",test_package_arn: get_uploads_by_name(TEST_SUITE,'APPIUM_RUBY_TEST_PACKAGE').arn,test_spec_arn: get_uploads_by_name('aws_android_4.yml','APPIUM_RUBY_TEST_SPEC').arn,filter: nil,parameters: nil
},configuration: {
extra_data_package_arn: nil,network_profile_arn: get_network_profile_by_name('Full').arn,locale: "en_US",location: {
latitude: 47.6204,# required
longitude: 122.3491 # required
},vpce_configuration_arns: nil,customer_artifact_paths: {
ios_paths: nil,android_paths: nil,device_host_paths: %w[/tmp/allure-results /tmp/screenshots]
},radios: {
wifi: true,bluetooth: false,nfc: true,gps: true
},auxiliary_apps: nil,billing_method: "UNMETERED" # accepts METERED,UNMETERED
},execution_configuration: {
job_timeout_minutes: 150,accounts_cleanup: false,app_packages_cleanup: false,video_capture: false,skip_app_resign: false
}
})
end

解决方法

异常 Missing or unprocessed resources 通常意味着您的上传内容之一存在问题。使用您上传的 GetUpload 查看出了什么问题。