I can't seem to figure out how to configure log output and results folders for Gradle TestNG runs.
First, Gradle picks $project_dir/build/reports/tests
by default for HTML report output. How do I change this default location? I tried setting testReportDir
in build.gradle
to no avail. Specifying a map in call to useTestNG(), e.g.
test {
if (runTest) {
// enable TestNG support (default is JUnit)
useTestNG {
outputDirectory = file("$buildDir/test-output")
}
}
}
does not work as well.
Second, I tried using TestNG's Reporter for some additional logging, e.g:
@Test
public void testMethod() {
parseFile();
Reporter.log("File parsed");
Assert.assertTrue(...);
}
But I can't seem to find the logs! Can someone please help?