Has anyone tried integrating Dojo DOH unit-tests with Jenkins?
I\'d like to do the following, but don\'t want to reinvent it if this has already been done. So, I\'m think
1. Automated Dojo testing - DOH & Selenium-RC (Rob Coup - 2008/01/03)
Plan:
- Have a config file defining which browsers to launch, which machines they're on, and what tests to run.
- Launch each browser via Selenium-RC
- Run the tests via the normal DOH browser runner.
- Use Selenium to extract the results from DOH.
- Collate the results from the various browsers and produce something useful.
Solution:
- Drop
seleniumRunner.js, seleniumRunner.config.js, seleniumRunner.sh
(or the.bat
if you're on Windows), andselenium-java-client-driver.jar
into util/doh/ in your Dojo install.- Put
selenium-server.jar
on each test machine, then runjava -jar selenium-server.jar -multiWindow
so it listens for the browser-control messages.- Edit
seleniumRunner.config.js
and changebrowsers
androotUrl
to match your setup. TherootUrl
needs to be reachable from each test machine.- run
./seleniumRunner.sh seleniumRunner.config.js
from util/doh/ on your workstation- It'll load the config, fire up the browsers on each machine, run the unit tests from Dojo core, and print the pass/fail/error stats for each.
- Each browser is kicked off and monitored in a separate thread (not strictly necessary but too cool to resist doing).
Issues:
- unless I ran the selenium server in multiWindow mode Safari and Firefox would pop up Print dialogs (!?!) whenever the test page was loaded. But Safari never initialised the test page if it was in multiWindow mode. On OSX and Windows. gah.
- Opera on OSX didn't set up the Selenium proxy properly (
localhost:4444
for reference).- IE didn't like doing a
dojo.connect()
via the selenium javascript commands for some reason.
2. Seems reasonable to me.
3. Jenkins Selenium plugin
This plugin turns your Jenkins cluster into a Selenium2 Grid cluster, so that you can utilize your heterogeneous Jenkins clusters to carry out Selenium tests. This plugin is a turn-key solution — no additional installation nor configuration is necessary to make it work. The plugin installs Selenium Grid on all the slaves automatically and set up a grid on its own.