I’m running my tests on Amazon device farm,
Recently we started to support multiple language in the app under test,
And for some specific reason we want to run the tests only in German on the device farm.
(By default when you install the app, it uses the device language if it’s supported)
I’ve specified in the testspec file for aws that I want de langauge and locale,
And the first time the app runs, Everything is in German as expected.
however after each tests, we un-install and reinstall the app.
After reinstalling the app, and from every install from that point the iOS app is now starting up in English whatever I set up.
It’s working locally on both Android and iOS, and it works on aws for Android.
My testspec file have the following capabilities for the appium server:
- >
APP_CAPABILITIES="{
"appium:usePrebuiltWDA": true,
"appium:derivedDataPath": "$DEVICEFARM_WDA_DERIVED_DATA_PATH",
"appium:deviceName": "$DEVICEFARM_DEVICE_NAME",
"platformName": "$DEVICEFARM_DEVICE_PLATFORM_NAME",
"appium:app": "$DEVICEFARM_APP_PATH",
"appium:automationName": "XCUITest",
"appium:udid": "$DEVICEFARM_DEVICE_UDID_FOR_APPIUM",
"appium:platformVersion": "$DEVICEFARM_DEVICE_OS_VERSION",
"appium:language": "de",
"appium:locale": "DE"
}"
And the driver I create also reads capabilities from a yaml file as follows:
app:
android:
capabilities:
"[appium:appPackage]": com.xyz.myapp
"[appium:appActivity]": com.xyz.myapp.MainActivity
"[appium:language]": de
"[appium:locale]": DE
options:
"[appium:chromeOptions]":
"w3c": false
ios:
capabilities:
"[appium:language]": de
"[appium:locale]": DE
since the “resetApp” is depecated,
We use driver.removeApp and driver.installApp to get the same behaviour, and finally driver.activateApp to start it again.
Why is it only failing on iOS and only on the device farm? what can be done to fix it?