问题
As can be seen in AndroidX Test 1.3.0 alpha04 release notes:
Include the test storage service in the test services
Unfortunately, this makes standard connectedDebugAndroidTest
to fail because this screen is getting displayed:
Choose what to allow TestServices to access
And this requires my interaction in order to proceed with UI testing.
This makes me to hang with already quite old 1.3.0-alpha03
artifacts, although 1.3.0-beta01
is already available.
Question:
How to accepts this permission via gradle command or within testOptions
configuration? Somehow I can find neither any indication in docs nor a post in web with similar issue.
UPDATE
Yuki Hamada, an engineer from Espresso team, confirmed that this is an issue and that they are working on that.
回答1:
You could brute force this by adding a Gradle task to run some ADB commands, but GrantPermissionRule is the proper way.
来源:https://stackoverflow.com/questions/61362916/disable-accept-test-storage-service-in-espresso