Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

Need more info on logging and debugging framework for Selenium

I have referred a few of the following resources below:

http://www.infostretch.com/QA/selenium-framework.php

http://www.javacodegeeks.com/2011/01/10-tips-proper-application-logging.html

share|improve this question

3 Answers 3

I've used log4j. Development of log4j seems to have gone dormant.

These days I use the Simple Logging Facade for Java (SLF4j) API, with logback as the implementation. Selenium internally uses another logging API and implementation (Apache commons logging, I think), but SLF4j offers mechanisms to reroute those other logging calls through your chosen SLF4j implementation.

One nice feature of logback: You can log each test class's output to its own log file. Another: You can write logs in HTML format, which makes them easy to post to intranets where anyone can access them in a browser.

share|improve this answer
    
I agree that your link to log4j 1.2 implies the project is dormant, but there is also a log4j 2.0 project (logging.apache.org/log4j/2.0/index.html) and there is activity on the log4j mailing list (mail-archives.apache.org/mod_mbox/logging-log4j-dev/201201.mbox/…;. –  user246 Jan 28 '12 at 22:25
    
Ah. Thanks for the update. –  Dale Emery Jan 28 '12 at 23:50

The most common logging framework for Java is log4j. A Google search will turn up many references, a few tutorials, and even a few books.

share|improve this answer

From previous questions of yours, it would appear as though you're doing most of your automation in Java. I'd recommend looking into a logging framework, or, create one for yourself. I'm not sure about Java, but, in .NET, I'd use tools like log4net or NLog. To create your own, all that you really need is to print your desired content and exceptions to a log file. Just a regular old textfile has always worked well for me.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.