在Proguard之后运行浓缩咖啡测试 [英] Run espresso tests after proguard

查看:84
本文介绍了在Proguard之后运行浓缩咖啡测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种在proguard运行后运行意式浓缩咖啡测试的方法-这应该是配置错误的proguard的安全网(将黄油刀更新至7.0后才忘记了更新proguard配置)/p>

I am searching a way to run my espresso-tests after proguard was running - This should be a safety-net for a miss-configured proguard ( just had this after updating butterknife to 7.0 and forgot to update the proguard config )

推荐答案

假设您正在使用Android Gradle构建系统中内置的标准机制来保护您的APK(为特定的buildType设置"minifyEnabled true"),则可以进行测试按照此处,并正常运行您已连接的AndroidTest任务.

Assuming that you are proguarding your APK using the standard mechanisms built into the Android Gradle build system (setting 'minifyEnabled true' for a particular buildType), you can test your 'proguarded' APK by setting the testBuildType as described here and running your connectedAndroidTest task as normal.

例如,如果您的版本" buildType是配置为针对其运行proguard的版本,则应将以下内容添加到gradle文件中:

For instance, if your 'release' buildType was the one configured to have proguard run against it, you would add the following to your gradle file:

android {
    testBuildType "release"
}

这篇关于在Proguard之后运行浓缩咖啡测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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