ApproachWhat we need to do is to run JSTestDriver's browser in a Virtual X Framebuffer (Xvfb) which is possible on nearly all Linux based systems. The example below uses a Solaris version of Linux, however, Debian and RedHat linux distrubutions come with the simplified bash script to easily run an appliation in a virtual framebuffer. This solution was derived from one posted solution on the JS Test Driver wiki (http://code.google.com/p/js-test-driver/wiki/ContinuousBuild. The given example is also a full working example that is in use at my current client.
Here is the quick list of what we will accomplish. Note, several of these steps are discussed in depth in the previous post and are not covered in depth here.
- Create a profile to run Js Unit-Tests
- Copy JsTestDriver library to a known location for Maven to use
- Use ANT to start JsTestDriver and pipe the screen into xvfb
Here is a sample profile to use. You will need to adjust the properties at the top of the profile to match your system.
Possible problemsAlthough I cannot predict or fix all problems, I can share the one major problem I ran into with Solaris and the script used to fix that. In Solaris (and could happen to other distros) the xvfb-run script was not available and several of the other libraries did not exist. I first had to download the latest X libraries and place them in their appropriate locations on the CI server. Next, I had to re-engineer the xvfb-run script. Here is a copy of my script (NOTE: This is the solution for my server and this may not work for you)
I created a script that contains:
/usr/openwin/bin/Xvfb :1 screen 0 1280x1024x8 pixdepths 8 24 fbdir /tmp/.X11-vbf &
Great post. Thanks for sharing.
I read this blog very carefully and find it very interesting and informative. I will like to recommend everyone to visit and read out this blog. Thanks for sharing with us. law dissertation proposal
I feel satisfied with your share.
It's very helpful for me and I am so happy to see your blog.
Thank you for sharing it with us. law dissertation help
Post a Comment