selenium - 如何与 gradle 并行运行 Serenity Web 测试?

标签 selenium gradle thucydides serenity-bdd

无法弄清楚如何与 gradle 并行运行 Serenity Web 测试。
Here是 maven + jenkins 的一个例子。但是我需要与 gradle 相同的东西。

最佳答案

您可以按照以下步骤执行此操作

第 1 步:创建套件文件

第二步:在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'

关于selenium - 如何与 gradle 并行运行 Serenity Web 测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37351246/

相关文章:

gradle - 在Android Studio中集成Crashlytics时出现的问题

git - 带有Gradle版本插件的Jenkins Pipelines

python - 如何禁用 "Save Password for this website"Selenium Python 语法

selenium - 在本地 docker 管道上运行 nightwatch + selenium 的问题

unit-testing - 终端上的Gradle堆栈跟踪

guice - 无法将 serenity-cucumber(又名 thucydides-cucumber)与 cucumber-guice 一起使用

java - Restful : How to hide Test Data from Report?

selenium - 访问selenium中的css类属性

javascript - 如何在selenium机器人框架脚本中使用javascript单击元素?

java - 修昔底德测试复制文本区域并填充文本