Selenium vs. Saucelenium
I can’t really say if you want one or the other. Revisiting Selenium in general, it’s IMHO the only viable and suitable thing for a PHP shop. Primarily of course because all those nifty test cases will integrate into our existing suite of PHPUnit/phpt tests. And while I use
Selenium and Saucelenium have the same root — in fact Saucelenium is a Selenium fork. While the Selenium project seems to focus on
2.x currently, stable
1.x development seems to really happen at Saucelabs. That is if you call a commit from January 22nd of this year active development.
In the process of selecting one or the other, more people recommended that I’d use the Saucelabs distribution than the original one, and so I forked it on github.
Along with a script to start the damn thing, my fork also contains a
README.md. Said README covers the installation part in detail, so I won’t have to repeat myself here. All of this is pretty Ubuntu-centric and has been tested on Karmic Koala. I expect things to work just as well on Lucid, or on any other distribution if you get the installation right.
One thing that took me a while to figure out was the following error message:
After Google’ing for a bit, I came to the conclusion that the above means that I didn’t have the xserver installed.
The fix was rather simple:
aptitude install xserver-xorg.
The following is an example test case. It’ll open
http://www.php.net/ and make sure it finds “What is PHP?” somewhere on that page.
Then it will continue to
/downloads.php (by clicking on that link) and will make sure it finds “Binaries for other systems” on that page.
To run this test, execute:
Thanks for reading, and until next time.