What is the simplest linux X11 build agent configuration for running automated UI testing?

I come from a jenkins background that had both xvnc and xvfb plugins.  Now I am struggling to get watir-webdriver to launch a firefox browser on a build agent.  I've tried using the headless gem and it works when I login into that build agent via ssh and run it, but when teamcity runs the build, the browser cannot seem to be launched properly:

[19:12:10][Step 2/4] [INFO]      Failure/Error: Unable to find matching line from backtrace

[19:12:10][Step 2/4] [INFO]      URI::InvalidURIError:

[19:12:10][Step 2/4] [INFO]        bad URI(absolute but no path): http://

[19:12:10][Step 2/4] [INFO]      # ./src/test/ruby/spec/spec_helper.rb:87:in `get_browser'
[19:12:10][Step 2/4] [INFO]      # ./src/test/ruby/spec/spec_helper.rb:48:in `(root)'

I would prefer to use a vnc based solution, as it makes debugging any environment issues easier, but would be happy to get anything going.

Comment actions Permalink

Hi Eric,

When you run the build manually did you login to the agent machine under the same user that the agent is running? Please try the steps described in the related doc section.

Comment actions Permalink

Yes, I logged in as the teamcity user.  I was able to resolve the problem by unsetting the 'http_proxy' environment variable.  Once that was done I was able to run the test suite in a headless state, that is using xvfb and the headless Ruby gem.  To debug any issues, I start an xvnc server and run the UI tests in a desktop using VNC viewer.  

This is an acceptable solution.  I would prefer a VNC plugin like jenkins has, but again this can work.  

Thank you.

Comment actions Permalink

Please feel free to create new feature request in our tracker. Or you can develop TeamCity plugin and share with other users.


Please sign in to leave a comment.