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.
$ 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.
Craig is a freelance UK web consultant who built his first page for IE2.0 in 1995. Since that time he's been advocating standards, accessibility, and best-practice HTML5 techniques. He's created enterprise specifications, websites and online applications for companies and organisations including the UK Parliament, the European Parliament, the Department of Energy & Climate Change, Microsoft, and more. He's written more than 1,000 articles for SitePoint and you can find him @craigbuckler.
Jump Start Git, 2nd Edition
Visual Studio Code: End-to-End Editing and Debugging Tools for Web Developers