Disable/accept test storage service in Espresso

偶尔善良 提交于 2021-02-10 05:45:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!