BT

How Do You Unit Test Your JavaScript Code?

| by James Chesters Follow 1 Followers on Oct 10, 2014 |

InfoQ's research widget has been deprecated. It should continue to work however, and we hope to relaunch it at some point in the future.

Recently, we asked about your JavaScript testing approaches -- if you were testing at all.

Your responses showed, overwhelmingly, that Unit Testing Tools are the most popular approach to JavaScript testing.

(Click on the image to enlarge it)

 

 

 

 

 

 

 

 

 

Now what we’d really like to know is: How Do You Unit Test Your JavaScript Code? Please let us know what unit testing tools you are using.

While there are too many to list every possible framework, we have selected some of the most popular or common.

The options:

  • ​​BrowserSwarm: An open source testing development tool from Microsoft for automated testing of JavaScript frameworks and libraries across devices and browsers
  • Buster.js: ​A Node.js testing toolkit and browser JavaScript testing toolkit that does browser testing with browser automation and QUnit style static HTML page testing, as well as testing in headless browsers.
  • FireUnit: FireUnit provides a simple JavaScript API for test logging and viewing within a new tab of Firebug.
  • Jasmine: an open source testing framework for JavaScript, influenced by other unit testing frameworks, such as ScrewUnit, JSSpec, JSpec, and RSpec.
  • JS Unit: An open source Unit Testing framework for client-side JavaScript, and a platform for automating the execution of tests on multiple browsers and multiple machines running different operating systems.
  • Karma: Karma is a tool that spawns a web server executing source code against test code for connected browsers. Karma examines test results and displays via the command line to the developer.
  • QUnit: A JavaScript unit testing framework for testing jQuery, jQuery UI and jQuery Mobile, and generic JavaScript code, supporting server-side (e.g. node.js) and client-side environments
  • RhinoUnit​: A Javascript Testing Framework using Rhino, Mozilla's open-source implementation of JavaScript
  • TestSwarm: JQuery's distributed continuous integration testing project for JavaScript
  • I don’t test

 

 

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Missing some tools by Declan Whelan

The tools listed (e.g. Jasmine) aren't available to to drag n' drop.

Re: Missing some tools by James Chesters

Well spotted, Declan -- Jasmine has now been added

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

2 Discuss

Sponsored Content

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT