Closed sergejsha closed 5 years ago
I just used the UI editor:
Which resulting in our bitrise.yml
updating to:
- virtual-device-testing-for-android:
inputs:
- test_devices: "$INSTRUMENTATION_DEVICE_LIST"
- inst_use_orchestrator: 'true'
- environment_variables: clearPackageData=true
- test_type: instrumentation
You can see that it got set when you run the workflow:
Configs:
- ApkPath: /bitrise/deploy/app-debug.apk
- TestTimeout: 900
- DirectoriesToPull:
- EnvironmentVariables: clearPackageData=true
- TestDevices:
---
Model API Level Locale Orientation
Nexus5X 24 portrait en
Nexus5X 25 portrait en
Nexus5X 26 portrait en
Pixel2 27 portrait en
---
- AppPackageID:
- TestType: instrumentation
- TestApkPath: /bitrise/deploy/app-debug-androidTest.apk
- InstTestPackageID:
- InstTestRunnerClass:
- InstTestTargets:
- UseOrchestrator: true
All of our tests are now passing.
Hi!
Thanks @tir38 for the solution.
@beworker could you please try to pass the env to the step like @tir38 did?
Hi!
I will close this issue as @tir38 provide the solution for it in https://github.com/bitrise-steplib/steps-virtual-device-testing-for-android/issues/38#issuecomment-466591584 . If you still have the issue please let us know.
Happy Building! 🚀
I had the same issue "clearPackageData flag been ignored". So then I used the envVar workaround mentioned above. That created a side effect. I was getting this error message randomly in different tests
Test failed to run to completion. Reason: 'Test run failed to complete. Expected 69 tests, received 11'. Check device logcat for details
Therefore I had to increase the timeout from 900 to 3600 which is another workaround to our initial problem.
Is there any other way of fixing this? @BirmacherAkos Can we re-open this ?
Hi @cpeppas!
Sorry to hear about this, can you please create a detailed report either in a new thread, here, or contact us about it directly?
It relates to #29
When running instrumentation tests, I need to set
clearPackageData true
flag as Android documentation says (search for-e clearPackageData true
).I tried to put the flag into the following step
like this (
inputs:
are omitted for sake of simplicity)like this
like this
and like this
In all the cases tests have failed because the flag has not been actually applied.
Is this flag supported and if yes, what would be the correct syntax to provide it to the tests?