如何与Gradle并行运行Serenity Web测试?

狡猾

无法弄清楚如何与gradle并行运行Serenity Web测试。是maven + jenkins的示例。但是我需要用gradle来做同样的事情。

丛林

您可以按照以下步骤进行操作

步骤1:建立套件档案

步骤2:在gradle中输入以下任务代码

task runAParallelSuite(type: Test) {
    def forks =2
    exclude ('**/Library.java')
    println "The Maximum parallel is $forks"
    // uncomment maxParallelForks if you prefer to use the Gradle process forker
    // which also requires a complete change of how the suite class works
    maxParallelForks = forks
    include '**/**TestSuite.class'
    // testReportDir = file("${reporting.baseDir}/AParallelSuite")
    // testResultsDir = file("${buildDir}/test-results/AParallelSuite")
    // show standard out and standard error of the test JVM(s) on the console
    testLogging.showStandardStreams = true
}

现在在cmd提示符下运行命令 'gradle clean runAParallelSuite aggregate'

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章