- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在查找文档时遇到问题,我该如何解决这个问题。
我能够启动小型/中型/大型测试:
./gradlew spoonSmall
./gradlew spoonMedium
./gradlew spoonLarge
或使用此设置启动特定测试:
spoon {
(...)
if (project.hasProperty('spoonClassName')) {
className = project.spoonClassName
if (project.hasProperty('spoonMethodName')) {
methodName = project.spoonMethodName
}
}
}
我可以启动特定文件:
./gradlew spoon -PspoonClassName=com.package.tests.MyTest;
我感兴趣的是启动位于以下位置的所有测试的可能性:
./gradlew spoon -PspoonClassName=com.package.tests
包。两种方法都可以。 bash 控制台的一些参数,或者创建我自己的注释并通过类似 ./gradlew spoonMyTests 启动的方法。
感谢您的建议/帮助。
最佳答案
来自官方文档:
There are numerous ways to run a specific test, or set of tests. You can use the Spoon --size, --class-name or --method-name options, or you can use the --e option to pass arguments to the instrumentation runner, e.g.
--e package=com.mypackage.unit_tests
当直接从命令行(而不是从 gradle 任务)执行 Spoon 时,以下命令应该有效
java -jar spoon-runner-1.1.9-jar-with-dependencies.jar \
--apk ExampleApp-debug.apk \
--test-apk ExampleApp-debug-androidTest-unaligned.apk \
--e package=com.package.tests
您需要找到一种方法将这个额外的参数传递给 Spoon gradle 插件。
来自official doc Spoon Gradle 插件:
Custom instrumentation arguments
Use the instrumentationArgs property on spoon extension to pass custom parameters to your tests:
spoon { instrumentationArgs = ["foo=bar", "name=value"] }
在您的情况下,这应该如下所示:
spoon {
instrumentationArgs = ["package=com.package.tests"]
}
关于android - 使用 Gradle Spoon 插件在特定位置启动测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33283238/
我正在 Maven 中运行 Spoon 启动器,但它没有找到处理器类路径。 Maven 调试语句: DEBUG spoon.Launcher - template classpath: [] INFO
我想使用 PDI spoon 获取 mongodb 中的最大 id。 我的集合中有这些字段: 身份证号码 流派字符串 在我插入新记录之前,我应该获得最大 Id。 你能帮我看看如何获取最大 Id 吗
我一直在尝试根据特定字段的值将 pentaho 转换的结果拆分为多个文件,但没有任何运气。 例如。包含以下内容的结果集: 姓氏、名字、国家 奥巴马, 巴拉克, 美国 卡梅伦,大卫,英国 布莱尔,托尼,
我从 sourceforge link 下载了 Pentaho Data Integration(或 Kettle)到我的 Windows 10 机器上在 Pentaho Community webs
pentaho 文档 ( http://wiki.pentaho.com/display/EAI/Job+checkpoints+and+restartability ) 指定,从版本 5.0 开始,
我在使用 javascript 步骤转换时遇到问题。 我只有三个步骤: 1- 数据网格(带有数据集) 输入: Col_1 | Col_2 | Col_3 a b c d
我正在尝试将 Java 代码的 Spoon 表示 转换为其他内容;假设是 JSON 或 XML 表示形式或其他 Java 模型。 我不知道如何以及从哪里开始。 我是否必须为 Spoon 的每个叶子编写
我有一份工作,其源连接为 Windows 上的 oracle。 在目标上,它应该通过 ssh 更新 ubuntu Linux 服务器上的 mysql 数据库表。 这可以做到吗? 在插入/更新步骤中是否
我一直在开发一种在方法内部注入(inject)内部类的处理器,但我在弄清楚如何生成类和伴随的对象初始化而不自动生成不正确的完全限定名称时遇到了很多麻烦。 例如,我一直在处理以下内容:我一直在制作一个新
我正在尝试对 Spoon source 进行更改(试图了解它是如何工作的)但无法弄清楚如何构建我们可以用来独立运行的最终 jar(具有类似于 the site 提供的依赖项)。 我尝试运行 ./gra
我正在使用 inria Spoon解析 Java 项目,然后提取有关类、接口(interface)、字段和方法及其所有引用的信息。 我正在使用以下代码构建输入项目的模型。 SpoonAPI spoon
我正在使用水壶勺进行改造。 如何从“获取系统信息”给出固定输入日期?我看到选择昨天、一个月前等选项。但我想手动选择固定日期,例如:'2012-12-14' 我从转换中得到了一个 csv,“文本文件输出
如果有人使用 SPOON API,您能给我一些如何创建调用图以及我需要做什么的线索吗? 我认为我需要创建一些像这样的处理器: public class InvocationProcessor exte
我想使用 script构建直方图。对你起作用吗?它对我不起作用。也许我做错了什么?我在浏览器书签中添加了 javascript 行: javascript:$.getScript('https://c
我正在尝试使用SPOON在android中编写注释处理器. 所以我的问题是当我编写注释处理器类时,如何向编译器指示它。 假设我的类位于 com.craftman.spoonprocessor.Cust
我有一个如下所述的 SQL 查询,这将每天更新数据库比较日期(最新附加的日期数据将在数据库中更新),我想使用 Pentaho 数据集成(Kettle)在转换中执行此操作。 Do While i =13
我运行我的 Espresso通过 Spoon 测试.通常,我会得到一个 build successful,但测试没有执行。我认为原因是没有对相关应用程序的代码进行任何更改。我明白他们为什么要这样做——
我有一个场景,我有两个独立的数据库olap和oltp,在输入表或脚本(mysql)中我想连接这两个不同的表数据库。 创建连接时无法将数据库列留空,因此无法访问数据库(和连接表)。 答案中建议的一个解决
我在查找文档时遇到问题,我该如何解决这个问题。 我能够启动小型/中型/大型测试: ./gradlew spoonSmall ./gradlew spoonMedium ./gradlew spoonL
我想知道如何停用登录Spoon (用于分析和转换Java源代码的库)? 例如,我想禁用调试日志消息。但是,我不知道如何将日志设置为Info(log.setLevel(Level.INFO);) 最佳答
我是一名优秀的程序员,十分优秀!