2014-12-02 127 views
0

我正在运行gradle test任务。gradle测试任务如何运行特定的junit测试套件?

task e2eTest(type: Test) { 
    testClassesDir = project.sourceSets.main.output.classesDir 
    classpath = project.sourceSets.main.runtimeClasspath 
} 

不过,我只希望一些的测试运行。

如何定义junit suit gradle可以根据它过滤测试并运行唯一的?

回答

0

你可以试试具体的测试筛选功能,如手动

http://www.gradle.org/docs/current/userguide/java_plugin.html(23.13.3)描述(摇篮1.10+)

如果您的具体测试套件可以通过其包或类名被精确定位,那么它应该做的伎俩。你可以让它取决于后来在Jenkins上进行参数化的变量,或者你想要的任何CI