禁用/接受Espresso中的测试存储服务 [英] Disable/accept test storage service in Espresso

查看:74
本文介绍了禁用/接受Espresso中的测试存储服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在AndroidX Test 1.3.0 alpha04中可以看到一个问题,他们正在努力解决这个问题.

解决方案

您可以通过添加Gradle任务来运行某些ADB命令来强行执行此操作,但是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.

解决方案

You could brute force this by adding a Gradle task to run some ADB commands, but GrantPermissionRule is the proper way.

这篇关于禁用/接受Espresso中的测试存储服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆