Command line FitNesse/Gradle命令行输出到文件中

Command line FitNesse/Gradle命令行输出到文件中,command-line,gradle,output,fitnesse,Command Line,Gradle,Output,Fitnesse,我正在尝试使用Gradle中的命令行启动FitNesse测试 build.gradle exec { ignoreExitValue = true commandLine = [ 'java', '-cp', fitnesseClasspath, // fitnesseClasspath set somewhere else 'fitnesseMain.FitNesseMain',

我正在尝试使用Gradle中的命令行启动FitNesse测试

build.gradle

exec {
    ignoreExitValue = true
    commandLine = [
        'java', 
        '-cp',          
        fitnesseClasspath, // fitnesseClasspath set somewhere else
        'fitnesseMain.FitNesseMain',
        '-c',
        "${suite}?suite&format=xml", // suite set somewhere else
    ]

}
现在,我希望将结果写入xml文件(我们称之为output.xml),而不是命令窗口。
我怎样才能做到这一点呢?

给你,只需替换参数

exec {
    commandLine = ['ls']
    args = [
        "./",
    ]
    standardOutput = new FileOutputStream("./hello.txt")
}

非常感谢。这会将所有命令行输出写入文件。有没有办法将FitNesse结果输入到文件中?FitNesse现在在哪里输出?对不起,我不熟悉FitNesse