logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Scott <jsc...@infoconex.com>
Subject RE: Using Log4Net with Selenium
Date Wed, 06 Jan 2016 15:27:54 GMT
catch(Exception ex)
      log.Error(ex); // log your exception
      throw; // allow exception to continue

-----Original Message-----
From: "superfreak3" <mawa316@gmail.com>
Sent: ‎1/‎6/‎2016 6:57 AM
To: "log4net-user@logging.apache.org" <log4net-user@logging.apache.org>
Subject: Re: Using Log4Net with Selenium

I've found that sending exceptions to the log in the catch block will cause the test to be
seen as successful overall.  How can I also set the test result for Selenium in that block.
pseudo code:Â  Set MyTestResult = Failed. ??

On Tue, Jan 5, 2016 at 10:00 PM, mawa316 . <[hidden email]> wrote:

Here's the file I spoke of...

On Tue, Jan 5, 2016 at 9:01 PM, superfreak3 [via Apache Logging] <[hidden email]> wrote:

I noticed something strange that has happened since adding logging with log4Net.  When exceptions
occur, they are caught and written as desired to the log.  However, running via both mstest
and Visual Studio 2015, despite the fact exceptions occur, the tests are still seen as successful.

I verified it has something to do with the logging additions as I got the previous version
from TFS and I'm able to run the tests in Visual Studio where the problematic tests do indicate

I've attached a file that shows the steps I followed to get logging to work.  I'm not sure
if the addition of an app.config file causes this to be handled differently within the testing
framework or handling in Visual Studio. 

Any help would be greatly appreciated!! 


If you reply to this email, your message will be added to the discussion below:
To unsubscribe from Using Log4Net with Selenium, click here.

View this message in context: Re: Using Log4Net with Selenium
Sent from the Log4net - Users mailing list archive at Nabble.com.
View raw message