Developers detest tests. It’s tedious to verify code which is obviously perfect. To make matters worse, the humble web developer rarely knows what OS or browser a user will choose and must test a variety of platforms. The top 5 browsers may be relatively easy, but they’ve been joined by an increasing varied and powerful array of mobile devices.
To help ease the burden, Yahoo has released Yeti — The YUI Easy Testing Interface. It’s an open source project built on node.js which allows unit testing from the command line:
$ yeti mytestpage.html ✔ DOM Tests from Safari (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16) 20 passed 0 failed
However, it’s Yeti’s multi-browser capabilities that will excite most developers. Running Yeti without arguments starts a web server at http://localhost:8000/. Any browser can be pointed at that URL — including mobile devices if you use a system such as localtunnel to create a public address for the local server. Every test you then run is automatically executed on all browsers visiting the Yeti URL and the results are returned to the console. Amazing.
Yahoo admit Yeti’s not complete, but you can download the v0.1 code today. It’s only been tested on Mac OS X, although it may work on a Linux PC with node.js. Once it’s running, any browser running on any OS can be pointed at the server.