LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-24-2010, 06:02 AM   #1
prabhakarank
LQ Newbie
 
Registered: Nov 2010
Posts: 3

Rep: Reputation: 0
Help required on running selenium test scripts headless


Hi,

I need to run "Selenium" test scripts (written inside TestNG) on a headless linux server (Red Hat Enterprise Linux Server release 5.3) using Xvfb. while executing the script, I get the following warnings in the "server.log" file.

Warning: Cannot allocate colormap entry for "#c0c0c0"
Warning: Cannot allocate colormap entry for default background.

This warnings occurs when the script try to launch Firefox. Firefox is not getting launched and the code gets hanged in the middle, without executing any test case.

I suspect the problem could be with the Xvfb's screen resolution. screen resolution might be lesser than firefox's expected resolution.

we can be able to specify our own display in POM file using <display> tag. similarly can we able to specify resolution also ?..

Pls help me out. Thanks in advance.
 
Old 11-24-2010, 06:40 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
Xvfb might be used on a headless server to test clients, for programs that expect X, but AFAIK, TestNG is used on a client to test a number of servers. It's not clear which you are trying to test, and where the test is being made.

The Xvfb manpage lists the default resolution and color depth.
-screen screennum WxHxD
This option creates screen screennum and sets its width, height, and depth to W, H, and D respectively. By default, only screen 0 exists and has the dimensions 1280x1024x8.
 
Old 11-25-2010, 12:03 AM   #3
prabhakarank
LQ Newbie
 
Registered: Nov 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks jschiwal for your timely reply..

Yes. I'm using TestNG to test server. I have used selenium (wrapped inside testNG) to do UI Testing on web pages residing in the same machine.. i mean, both selenium server and the website being tested are residing in the same machine (localhost).

As u said the default screen's depth is 8. I suspect this is not good enough to run firefox.

http://mojo.codehaus.org/selenium-ma...with-xvfb.html

In the above link, they have explained to use external display in the Xvfb configuration. but, when we create the screen at command prompt and give that display no in the Xvfb configuration and while build it, it shows error like " display no is already in use ".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help required on running selenium test scripts headless prabhakarank Linux - Virtualization and Cloud 1 11-24-2010 06:15 AM
[SOLVED] Cannot get VNC running headless Mithrilhall Fedora 1 10-19-2010 11:09 AM
Running Pandora.com on a headless server. SkipHuffman Linux - Server 0 09-03-2009 11:32 AM
Running Skype on a headless system? Foomajick Linux - Software 0 11-19-2006 09:29 AM
running test scripts with php PhilTR Linux - Server 11 09-12-2006 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration