Gradle 経由で TestNG テストを実行しています。デフォルトの XMLReporter の stackTraceOutputMethod の値を構成したいと考えています。
これは私のGradleタスクです
// runs test cases using TestNG framework
task runTests(type: JavaExec, dependsOn: classes) {
main = 'org.testng.TestNG'
args '-reporter org.testng.reporters.XMLReporter:stackTraceOutputMethod="0" testng.xml'
classpath configurations.runtime
systemProperties 'logDir': 'logs'
}
次のエラーが表示されます。
15:30:36.343 [エラー] [system.err] 不明なオプション: -reporter org.testng.reporters.XMLReporter:stackTraceOutputMethod=0 testng.xml
15:30:36.390 [QUIET] [system.out] 使用法: [オプション] 実行する XML スイート ファイル
オプション:
-configfailurepolicy 構成失敗ポリシー (スキップまたは
継続する)
-d 出力ディレクトリ
-dataproviderthreadcount 実行時に使用するスレッドの数
データプロバイダー
-excludegroups グループ名のコンマ区切りリスト
除外
.
.
.
Java引数を提供する方法が間違っていると思います。
args '-reporter org.testng.reporters.XMLReporter:stackTraceOutputMethod="0" testng.xml'
誰かがそれを行う正しい方法を教えてもらえますか?
ありがとう