Reputation: 169
I am using this command for executing from CLI -
aws devicefarm schedule-run --project-arn "project-arm value" --app-arn "app-arm value" --device-pool-arn "device-pool-arm value" --name "Automated_script" --test '{"type":"APPIUM_JAVA_TESTNG","testPackageArn":"testPackageArn value"}'
But getting this error
An error occurred (ArgumentException) when calling the ScheduleRun operation: Missing or unprocessed resources.
Upvotes: 3
Views: 1936
Reputation: 5247
My issue was invalid yaml file used for testSpecArn
You can check its validity with yamllint
, this is how:
brew install yamllint
yamllint .
If there are issues with your yaml file they will be described in terminal as errors, with red color.
Upvotes: 0
Reputation: 91
Double-check all of your ARNs with a bash script:
PROJECT_ARN=<paste project ARN here>
APP_ARN=<paste app ARN here>
<define other ARNs here>
#Verify ARNs
aws devicefarm get-project --arn $PROJECT_ARN
aws devicefarm get-upload --arn $APP_ARN
aws devicefarm get-upload --arn $TEST_PACKAGE_ARN
aws devicefarm get-upload --arn $TEST_YAML_ARN
aws devicefarm get-device-pool --arn $DEVICE_POOL_ARN
aws devicefarm get-vpce-configuration --arn $VPCE_CONFIG_ARN
Our mistake was that one of our ARNs was for a test file which hadn't been uploaded, note the status initialized, not completed:
...
"status": "INITIALIZED",
"category": "PRIVATE",
"contentType": "application/octet-stream",
"name": "googlePlayProdDebug-UITest-debug.apk",
...
Another mistake was trying to use a device pool which was not a part of our project. Device pools are specific to projects.
Try:
aws devicefarm list-device-pools --arn <projectARN>
Upvotes: 2
Reputation: 1391
I had the same issue, in my case the "type" was wrong. My project is JNUIT
aws devicefarm schedule-run --project-arn $PROJECT_ARN --app-arn $APP_UPLOAD_ARN --device-pool-arn $DEVICE_POOL_ARN --name customTestName --test type=APPIUM_JAVA_JUNIT,testPackageArn=$TESTS_UPLOAD_ARN
Upvotes: 0
Reputation: 912
To Schedule a run, you need to do the following steps:
aws devicefarm create-project
to create a project for all your testsaws devicefarm create-upload
for your application under testcreate-upload
aws devicefarm create-upload
for your test scriptscreate-upload
aws devicefarm schedule-run
Normally when you see "An error occurred (ArgumentException) when calling the ScheduleRun operation: Missing or unprocessed resources."
, it means you forgot step 3 or step 5. You can upload your application to the pre-signed URL using curl
. You can check whether your upload has been successfully processed by calling aws devicefarm get-upload
.
Here is an example blog post which uses the AWS CLI to schedule a run: Get started with the AWS Device Farm CLI
Upvotes: 2