Selenium 2.0 Webdriver and VNC sessions

600 views
Skip to first unread message

stamp_guru

unread,
May 10, 2011, 6:11:09 PM5/10/11
to Selenium Users
I have a suite of tests which I completely refactored to use the Web
driver/Selenium 2.0 model with 2.0b3. While the switch over was not
as painless as I had hoped, it did afford me to do some nice
refractoring in my library/testhelpers to clean up some stuff (I'd be
willing to point out my "trouble points and some nice things" in a
separate thread). My app is essentially a GWT/GXT app hosted on
glassfish server using JSON to communicate to a RESTful web app. I
got this 100% working on my Windows 7 laptop. I also executed the
tests pointing to the web-app on my linux server and they pass 100%.
ie. Running from maven or eclipse in Windows 7 with Firefox 4.0
results in 100% pass rate.

I checked in my code to my branch, ran my Jenkins job to merge it to
my trunk (I use subversion), build the module, kick of a test web-app
restart job and then run the selenium test job in Jenkins. This will
execute the tests on a virtual display 2 which is mapped via VNC
Server (ie. the job will call "export DISPLAY=:2" via the SetEnv
plugin). I get 22 out of 82 failures. Now if I remotely "view" the
VNC Server (view with a VNC Viewer) to see what is happening..... I
get 17 failures....... if I bring up a VNC Viewer and minimize it I
get 15 failures. huh? What is going on with the mystical VNC? (I do
need to log onto the local console and run it on the main 0.0 display
- will do this tonight ie. not in VNC to see my pass rate)

Note:
* the 82 tests all pass when run on Windows 7 client and FF4
(independent of server host)
* the 82 tests all passed in selenium 1.0 on VNC Server (independent
of viewer "accessing")
* many (not all) seem to relate to either key stroke actions or events
not getting emitted (for example blur/change events triggering another
field to update etc.)

I was thinking it was timing related (since these are all on the same
system so there is 0 latency) but this didn't seem to make any
difference tinkering (I should also note that a lot of my test
harnesses have been made fault tolerant over the years waiting for
elements etc. to appear)

I have spent a lot of time trying to debug this but of course it is
difficult since it is related to the "session/environment" it is run
in (not the test/test harness itself) and I can not reproduce it on my
laptop dev environment.

Has anyone seen problems executing the tests through VNC in this
matter? (Selenium 2.0 only please)

I have considered digging up my old license keys for XP or Vista
(gasp) and creating a virtual PC for that and using it as a Jenkins
slave to execute the tests (since they seem to run fine on a Windows
OS and this is my primary client environment for the app).

I can not imagine the browser is that different between Linux/Windows
for Firefox (note: I am not doing any funky key mappings like CTRL-F1
or something).

Any thoughts on what I could try?

Reply all
Reply to author
Forward
0 new messages