You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have stumbled upon an issue where, if my instrumentation test filter is not able to run any tests, gradle build fails. Is there a way to avoid this ?
I have a test suite consisting of tablet and phone tests, and during runtime I am doing custom filtering based on the characteristic of device under test using CustomFilter API's. So, I have device pool consisting of a phone and tablet device. And I have having a class level annotation that specify tests to only target the tablet devices. As expected, all the tests run on tablet device. Since, there were no tests scheduled for the phone device. Even after all the test finished successfully, the build failed with the following error:
INSTRUMENTATION_RESULT: stream=
Time: 0
OK (0 tests)
INSTRUMENTATION_CODE: 0
this is the test-results.log file generated under app/build/outputs/androidTest-results dir for Pixel_6 device. I suspect instrumentation code need to be -1 for instrumentation to succeed.
xml report seems to contain system-err tag generated for the Pixel_6 device.
Steps to Reproduce
Spin up an emultor with tablet resolution(landscape) and other one with phone resolution(portrait)
Run test as usually and specify className as instumentation filter args.
Expected Results
The gradle build should succeed as it run tests on the desired device factor, skipping tests only on the non-desired device.
Actual Results
even though the test run succeed, the gradle build failed
Description
I have stumbled upon an issue where, if my instrumentation test filter is not able to run any tests, gradle build fails. Is there a way to avoid this ?
I have a test suite consisting of tablet and phone tests, and during runtime I am doing custom filtering based on the characteristic of device under test using CustomFilter API's. So, I have device pool consisting of a phone and tablet device. And I have having a class level annotation that specify tests to only target the tablet devices. As expected, all the tests run on tablet device. Since, there were no tests scheduled for the phone device. Even after all the test finished successfully, the build failed with the following error:
this is the
test-results.log
file generated underapp/build/outputs/androidTest-results
dir for Pixel_6 device. I suspect instrumentation code need to be -1 for instrumentation to succeed.xml report seems to contain
system-err
tag generated for the Pixel_6 device.Steps to Reproduce
Spin up an emultor with tablet resolution(landscape) and other one with phone resolution(portrait)
Run test as usually and specify className as instumentation filter args.
Expected Results
The gradle build should succeed as it run tests on the desired device factor, skipping tests only on the non-desired device.
Actual Results
even though the test run succeed, the gradle build failed
AndroidX Test and Android OS Versions
AGP - 8.5.1
Espresso - 3.6.1
androidXTestCore - 1.6.1
androidXTestJUnit - 1.2.1
androidXTestRules - 1.6.1
androidXTestRunner - 1.6.1
androidXTestOrchestrator - 1.5.0
Link to a public git repo demonstrating the problem:
The text was updated successfully, but these errors were encountered: