Microsoft Offers BrowserSwarm JavaScript Testing Tool

Open Source © marekuliasz Shutterstock 2012

Microsoft and its partners have launched BrowserSwarm, an open-source tool for testing JavaScript frameworks

Microsoft has launched BrowserSwarm, a new open-source tool that helps Web developers automate the testing of their JavaScript frameworks and libraries across different devices and browsers.

Developed in collaboration with AppendTo and Sauce Labs, BrowserSwarm is powered through the cloud, allowing developers to save time setting up multiple browser or device testing environments and precious server resources, Microsoft said.

Testing Tool

“BrowserSwarm is a way to help developers spend less time testing and more time innovating, Justin Garrett, senior product manager on Microsoft’s Internet Explorer team, told eWEEK.

javaIn a blog post on the new tool, Garrett wrote: “Most top JavaScript frameworks like jQuery, dojo, prototype and Modernizr – used by over 70 percent of the top traffic Websites worldwide – have enough resources to perform testing regularly. But what if you’re a startup building a new framework? Testing is probably the last (but necessary) thing you want to do. So – just like we announced modern.IE testing tools for developer sites – we are partnering on BrowserSwarm to help framework authors. We want to alleviate the time spent testing frameworks (and the sites they service) so that developers have more time to innovate on the Web.”

AppendTo provides consulting, training and software development services on jQuery, and SauceLabs offers a cloud-based JavaScript testing platform.

“Thorough testing is essential for any JavaScript project that needs to work properly on all browsers,” Dave Methvin, president of the jQuery Foundation, said in a statement. “Although some projects do unit testing with “headless” browser setups such as PhantomJS, there is no substitute for testing with real browsers. If that work isn’t automated, however, the chances are that it won’t be done regularly. BrowserSwarm gives projects a powerful tool to automate multiple-browser testing scenarios and find problems before software is released.”

Explaining how BrowserSwarm works, in a separate blog post, Sandeep Singhal, group program manager for Internet Explorer, said, “BrowserSwarm connects directly to your team’s code repository on GitHub and uses Sauce Labs’ cloud to automatically run Unit Tests using QUnit. A simple report separates which test cases passed and failed so you can quickly see what needs to be fixed. BrowserSwarm provides test results using top frameworks and libraries such as prototype.js and Modernizr. You receive an overall pass rate across browsers and devices, along with individual test pass rates for top browsers.”

No More Pain

The BrowserSwarm project is in beta, and Microsoft is hoping Web developers will get on board and use the tool and provide feedback to help improve it, Garrett said. For front-end Web developers, BrowserSwarm is complementary to Microsoft’s modern.IE Website, which provides a set of free tools and resources to help developers build Websites for all modern browsers, he said.

Running unit tests across many browsers is normally a tedious and painful process,” Ryan Niemeyer, appendTo architect and Knockout.js core contributor, said in a statement. “For many of the libraries that I have developed, it is a step that I often skip on each build due to time constraints. BrowserSwarm helps take away much of this pain, which can help free up OSS [open-source software] developers to devote more time to actually doing the development that they love.”

Also in a statement, Jörn Zaefferer, jQuery UI dev lead, QUnit maintainer and jQuery Validation Plug-in author, said, “The preview of BrowserSwarm looks very promising. The Sauce Labs integration provides great cross-browser coverage. The test results can be browsed and compared to previous runs. This would be a valuable tool for a lot of open-source JavaScript projects.”

Microsoft’s Singhal said the open-source partnership represented by BrowserSwarm is a continuation of Microsoft’s history of working with the community to make the Web better. “We have over 90 Microsoft people involved in 63 W3C working groups, and we have submitted thousands of test cases and hundreds of core reference docs to,” he said. “With the new F12 Developer Tools in IE11, free site scanning tool on and free virtual machines, we continue to help developers build a new class of modern Web experiences.”

How well do you know open source? Try our quiz!

Originally published on eWeek.