Cross browser testing with Soda and Selenium

Today, the cool kids at LearnBoost Labs, the creators of a pretty sweet online gradebook service, released Soda, a web testing library for NodeJS and Selenium, with built-in integration for cross-browser testing with Sauce Labs. It's truly awesome. (It's earned an exception to my general rule against the over-use of the word 'awesome'.) Node.js is the new kid in web technologies, but it's experiencing rapid growth in developer adoption, at a rate not seen since the early rise of Rails. Here's a sample acceptance test written with soda:

var soda = require('soda');

var browser = soda.createSauceClient({
  'url': 'http://yourwebsite/'
, 'username': ''
, 'access-key': ''
, 'os': 'Windows 2003'
, 'browser': 'googlechrome'
, 'max-duration': 300

  .type('username', 'invalid')
  .type('password', 'invalid')
  .assertText(' li',
    'Please check your username / password')
    if (err) throw err;

Using chained methods, Soda very elegantly solves Node's "ugly callback syntax" problem. I suspect more NodeJS libraries will copy this pattern. Seriously, check out Soda now! :-)

Written by

Jason Huggins


Cross browserSelenium