VitaliyKulikov / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

testng extension: possible removal of Logger? #299

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

Log4J calls in ScreenshotOnFailureListener.java seem to be interfering with
the UAT logger, ie. writing to the log while the application is
initializing/shutting down.  Since this is a TestNG pluggin maybe we should
use Reporter.log() instead?

version: 1.0b1

Original issue reported on code.google.com by vnguyen....@gmail.com on 3 Feb 2009 at 4:14

GoogleCodeExporter commented 8 years ago
I'm not sure this is a valid issue. ScreenshotOnFailureListener does not use 
Log4J,
instead we use JDK logging just to log where the screenshot is being saved in 
the
file system (for debugging purposes.) We do use Reporter.log to write the 
hyperlink
to the screenshot to the TestNG report.

Thanks,
-Alex

Original comment by Alex.Rui...@gmail.com on 7 Feb 2009 at 1:40

GoogleCodeExporter commented 8 years ago
Logging calls such as the one in onStart() ends up in the application under 
test log
file (which uses log4j).  In principle this wouldn't be a good idea.  Maybe I'm 
not
setting up the screen shot listener properly?  Here's how I do it

TestNG tng = new TestNG();
tng.setOutputDirectory(outputDir);
//...loading xml suite
tng.setXmlSuites(suites)

tng.addListener(new ScreenshotOnFailureListener() );

tng.run();

Original comment by vnguyen....@gmail.com on 9 Feb 2009 at 3:17