Hi, I attached a simple project. I was trying to disable default listener and re-enable two of the default listener a.k.a. reporter. The documentation mentions a property -reporter (analogous to -listener). For me this flag is not working. Any reporter set here is silently ignored ('mvn -f pom.xml clean test' in test project). I am calling testng through maven-surefire-plugin but that should not change what is documented here, right?
http://testng.org/doc/documentation-main.html (Chapter 4 - Running TestNG).
Second thing is if I set the reporter as listener it gets called but does not work:
java.io.FileNotFoundException: D:\mbc\testng-bug\.\target\surefire-reports\testng-results.xml (The system cannot find the path specified.)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:205)
at java.io.FileOutputStream.<init>(FileOutputStream.java:156)
at java.io.FileWriter.<init>(FileWriter.java:84)
at org.testng.internal.Utils.writeUtf8File(Utils.java:107)
at org.testng.reporters.XMLReporter.generateReport(XMLReporter.java:66)
at org.testng.TestNG.generateReports(TestNG.java:1115)
at org.testng.TestNG.run(TestNG.java:1074)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:115)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:128)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:112)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:112)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Execute 'mvn -f pom-2.xml clean test' in test project to reproduce. Same for the SuiteHTMLReporter, it can not find testng.css.
Thx in advance
Christian