Re: How to show selenium execution logs in eclipse

1,071 views
Skip to first unread message

Ramakrishna Gopalan

unread,
Jul 13, 2012, 5:55:28 AM7/13/12
to seleniu...@googlegroups.com
Hi Neo,

I m not sure of how these logs can be viewed in eclipse. But these logs can be exported as a log file to the same directory where you have your selenium-server.jar.

That could be done by starting your selenium server as follows

java -jar selenium-server.jar -browserSideLog

A "Selenium.log" file gets generated to your selenium server folder.

Check this for more information:

http://wiki.openqa.org/display/SRC/Selenium+RC+Logging

Seleniumite,
Ramakrishna



On Thursday, July 12, 2012 5:36:41 AM UTC+5:30, Neo wrote:
I watched a selenium video, and found there are some logs can be seeing from eclipse with Selenium RC.   

But I can't see any logs in my eclipse when I use selenium RC.  

Is there anyone can tell me how to show execution logs which presented on server side in eclipse.  See attachment for details.

Also , Can this logs be seen with Webdriver?


Karthik Kulkarni

unread,
Jul 13, 2012, 6:30:54 AM7/13/12
to seleniu...@googlegroups.com
Use Log 4j API for logging . Try to explore logs class in selenium webdriber eveni hav enot done that).

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/LTGMtDGW8yEJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.

David

unread,
Jul 13, 2012, 2:53:56 PM7/13/12
to seleniu...@googlegroups.com
Thought I'd also ask how this would be done or differ for WebDriver. For WebDriver, I'm asking in a driver/browser agnostic way, such that we get/see logs for all drivers in Eclipse.

I come from Selenium RC using PHPUnit and by default it has a nice execution log that is dumped out to stdout (viewable via stdout if executing PHPUnit from terminal or viewable in Eclipse if using Eclipse PDT) that tells you what commands have been executed and are currently being executed. I miss that kind of logging with Java WebDriver in Eclipse (or even just JUnit by itself) using default WebDriver code and Eclipse/JUnit config (i.e. no modificiation of logging in WebDriver or Eclipse/JUnit). The only useful logging by default for Java WebDriver is exceptions when test fails. But while it's running, or if test passes, you see nothing in logging output within Eclipse or JUnit unless you specifically print to stdout, etc. So you'd have to monitor the browser GUI to see where the test is actually at compared to being able to monitor log for execution status in PHPUnit for RC.


On Friday, July 13, 2012 3:30:54 AM UTC-7, Karthik Kulkarni wrote:
Use Log 4j API for logging . Try to explore logs class in selenium webdriber eveni hav enot done that).

On Fri, Jul 13, 2012 at 3:25 PM, Ramakrishna Gopalan <ramakrish...@gmail.com> wrote:
Hi Neo,

I m not sure of how these logs can be viewed in eclipse. But these logs can be exported as a log file to the same directory where you have your selenium-server.jar.

That could be done by starting your selenium server as follows

java -jar selenium-server.jar -browserSideLog

A "Selenium.log" file gets generated to your selenium server folder.

Check this for more information:

http://wiki.openqa.org/display/SRC/Selenium+RC+Logging

Seleniumite,
Ramakrishna



On Thursday, July 12, 2012 5:36:41 AM UTC+5:30, Neo wrote:
I watched a selenium video, and found there are some logs can be seeing from eclipse with Selenium RC.   

But I can't see any logs in my eclipse when I use selenium RC.  

Is there anyone can tell me how to show execution logs which presented on server side in eclipse.  See attachment for details.

Also , Can this logs be seen with Webdriver?


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/LTGMtDGW8yEJ.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

David

unread,
Jul 16, 2012, 5:11:35 PM7/16/12
to seleniu...@googlegroups.com
I have not worked with RC with Eclipse & Java (only Eclipse and PHPUnit). I have worked with Selenium 2 with Eclipse and Java.

I only see command execution status output (in the console tab) from Eclipse for PHPUnit, not for Eclipse Java/JUnit. I don't know what you need to do for Java to get what you want. 

I guess for PHPUnit(-Selenium), the framework is verbose and dumps a lot of stuff out stdout to help you monitor & debug. You get the same when you run PHPUnit(-Selenium) from command line, and similarly JUnit doesn't dump anything like PHPUnit on command line for execution status, until it hits an exception where it gives you a stack trace. So in Java by default, the result is either pass with no console logs (unless you happen to print to stdout) OR fail with stack trace.

On Sunday, July 15, 2012 5:22:51 PM UTC-7, Neo wrote:
Thanks all for your replies.   I can export some log files by typing  "java -jar selenium-server.jar -log selenium.log",  but this is not exactly what I want.

I want to see which commands is executing in ECLIPSE. plese have a look at the below video 00:46.
http://www.youtube.com/watch?v=A6ND9pRRBY8


David,  do you mean you can see the logs in eclipse with selenium RC?  Could you please tell me how to make logs available with RC ?

Regards,
Neo
Reply all
Reply to author
Forward
0 new messages