使用 ant 构建 Android 测试时,如何为 emma 使用过滤器? [英] How can I use filter for emma when building Android test with ant?

查看:25
本文介绍了使用 ant 构建 Android 测试时,如何为 emma 使用过滤器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道在构建我的 android 测试项目时如何在 ant 中使用 emma,但是我找不到关于在使用 SDK 时如何使用过滤器的任何提示.emma 网站在自己调用 emma 时对此进行了解释,但在 Android SDK 构建文件中,在 ant 文件或命令行中未调用 emma,因此我无法添加过滤器选项.

I know how to use emma in ant when building my android test project but I can't find any tips on how to use filters when using the SDK. The emma website explains it when calling emma yourself but in the Android SDK build files emma is not called in the ant files or on the commandline so I'm not able to add the filter options.

大家有什么建议吗?

推荐答案

从 SDK Tools r18 开始,您可以简单地添加

As of SDK Tools r18 you can simply add

emma.filter=-com.your.excluded.package.*

到您项目的 ant.properties(非测试项目)

to the ant.properties of your project (not Test project)

这篇关于使用 ant 构建 Android 测试时,如何为 emma 使用过滤器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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