Open espekkaya opened 1 year ago
Parameter validation there isn't implemented yet, see the comment at https://github.com/realm/aws-devicefarm/blob/master/test-application/index.js#L46
In the code you posted you've dropped the app_file parameter pointing to an Android package - you either need to provide the path to an apk file, or upload the apk file and provide the ARN of that upload. I'd expect specifying the project ARN as you did there will throw an error later on in the test run.
So far we're mostly ignoring the appium stuff - our Android app has tests embedded. Your example looks like you are actually running appium tests. If you have something working there please provide stripped down test data so I can add proper support for it.
Hi @bwachter , I tested test cases on the device browser (such as chrome) at the device farm, so I haven't added any apk or IPA files which is why I'm getting error.
Here is my capabilities on webdriverio:
config.capabilities = [
{
// The defaults you need to have in your config
platformName: 'Android',
browserName: 'chrome',
maxInstances: 1,
// For W3C the appium capabilities need to have an extension prefix
// http://appium.io/docs/en/writing-running-appium/caps/
// This is `appium:` for all Appium Capabilities which can be found here
'appium:deviceName': process.env.DEVICEFARM_DEVICE_NAME,
'appium:platformVersion': process.env.DEVICEFARM_DEVICE_OS_VERSION,
'appium:chromedriverExecutable': process.env.DEVICEFARM_CHROMEDRIVER_EXECUTABLE,
'appium:orientation': 'PORTRAIT',
'appium:automationName': 'UiAutomator2',
'appium:newCommandTimeout': 240,
'goog:chromeOptions': {
// @ts-ignore
w3c: false,
},
},
];
Can you fork this repository, and try a few things?
I believe if you remove appArn from https://github.com/realm/aws-devicefarm/blob/master/lib/schedule-run.js#L128 it should work without specifying that parameter - assuming AWS lets you do a run without any application, which I'm not sure about.
The following code throws an error as
Error: ValidationException: 2 validation errors detected: Value '' at 'appArn' failed to satisfy constraint: Member must satisfy regular expression pattern: ^arn:.+; Value '' at 'appArn' failed to satisfy constraint: Member must have length greater than or equal to 32
But when I add
app_arn: ${{ secrets.AWS_PROJECT_ARN }}
, the error is gone.I look out the code, and this param is not required.