Today we're excited to announce a new and improved way to test your JavaScript unit tests on the Sauce Labs cloud. These changes, including a revamped REST API, provide an easy way for JavaScript developers to do massive cross-browser testing of their apps without setting up or maintaining any test infrastructure.
Using Sauce for your JS unit testing gives you instant access to difficult to maintain OS/browser combinations, including Mac OS X and Internet Explorer, providing you with better test coverage and scalability. You can also integrate your tests with your CI system to automatically ensure your browser compatibility on a per-commit basis. Currently, you can easily run your Jasmine, QUnit, YUI Test, or Mocha tests on Sauce Labs using Grunt, Yeti, Karma, Mocha Sauce, or Intern.
For a long time now, our primary goal at Sauce has been to make functional Selenium testing a killer experience. While we've added additional capabilities to our platform, like manual testing and hybrid and native mobile app testing, JavaScript unit testing, although used here and there by some customers, wasn't a core focus. That changed this past May when we attended JSConf. Not only did we meet tons of developers using Sauce, the majority of them were using us for JavaScript unit testing, particularly if they had an open source project that needed cross-browser testing coverage (did you know we offer unlimited-use plans for open source projects?). After talking with a few developers at various companies for feedback on how we could improve the experience, we learned that some relatively minor changes could have a big impact on how easy and useful it is to test JavaScript functionality using Sauce's cloud infrastructure. Then we got to work.
What make JS unit testing awesome on Sauce? REST API First of all, our new REST API makes it super simple to run your tests on our cloud - and it takes Selenium out of the equation. In the past, if you did JavaScript unit testing on Sauce, you had to use the Selenium libraries to instantiate the browser. Now, this happens seamlessly in the background.
Test Details Page To help JS developers identify issues lightning fast, we did an overhaul of the test details page, creating a test report specifically designed for JavaScript unit tests. You'll be able to see and share all your test details easily and identify failures faster using the screenshots, video and logs.
If you've never done any sort of JavaScript unit testing on Sauce, we suggest getting started by signing up for a free account and reading our documentation. If you've already picked your tool of choice, check out our simple REST API to get started. And if you're using Grunt, Yeti, Karma or Mocha, check out the following links: Grunt-SauceYeti & Sauce LabsKarma Sauce Launcher Mocha-Sauce
Want to learn more about how other companies do JS unit testing on Sauce? Read our latest case study featuring Mobify. Mobify uses Sauce to test mobify.js, their JavaScript library for powering responsive sites. Mobify was able to easily automate their unit testing and run their tests easily in the cloud using our Grunt integration. Happy JavaScript unit testing!