AWS Device Farm调度运行报错求助:APPIUM_NODE不支持标准测试环境
Hey Vijay, I’ve run into this exact issue before when scheduling Appium Node.js tests via the AWS CLI—let’s get you sorted out!
Why This Error Happens
When you run tests manually through the AWS Device Farm console, the platform automatically detects that APPIUM_NODE requires a Custom Test Environment (since it’s a Node.js-based custom Appium setup, not the pre-configured Appium for Android/iOS in the Standard environment). But the CLI doesn’t make this assumption automatically—it defaults to trying the Standard environment, which doesn’t support APPIUM_NODE.
The Fix: Explicitly Specify Custom Environment in Your CLI Command
You need to add the --configuration parameter to your schedule-run command to tell Device Farm to use the Custom environment. Here’s the corrected command:
aws devicefarm schedule-run --project-arn projectArn --app-arn appArn --device-pool-arn dpARN --name myTestRun --test type=APPIUM_NODE,testPackageArn="testPkgArn" --configuration "{\"environment\": {\"type\": \"CUSTOM\"}}"
Quick Checks to Ensure Success
- Double-check that your test package was built for the Custom environment: it should include your
package.json, all dependencies (runnpm installbefore zipping), and your test scripts. - If you’re still having issues, consider upgrading your AWS CLI to a newer version (your current 1.17.0 is a bit outdated) to avoid any parameter compatibility bugs.
内容的提问来源于stack exchange,提问作者Vijay

