从android测试应用访问android测试资源

时间:2018-11-23 01:47:29

标签: android android-resources android-instrumentation

我正在寻找一种从测试应用程序访问strings.xml文件夹中app/src/androidTest/res/values内容的方法。

我知道可以通过以下电话进行通话。

String url = InstrumentationRegistry.getContext().getString(com.company.app.test.R.string.test_url);

有没有比指定软件包名称更好的方法来调用它了?

0 个答案:

没有答案