4

Gradle と並行して Serenity Web テストを実行する方法がわかりません。 これはmaven + jenkinsの例ですしかし、gradleでも同じことが必要です。

4

2 に答える 2

4

手順に従ってこれを行うことができます

ステップ 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
}

コマンドプロンプトでコマンドを実行します'gradle clean runAParallelSuite aggregate'

于 2016-05-31T12:43:19.067 に答える
1

Here is another way to do this

   test {
       maxParallelForks=2
       options {
           systemProperties(System.getProperties())
       }
       ...
   }

maxParallelForks allows to set maximum number of forked test processes to execute in parallel with jUnit

于 2016-09-22T08:03:43.033 に答える