Testing Tools

Read about how I implemented the live star counting on this page.

Frameworks

Name Stars Browser Node.js Promises? Notes
Jasmine yes with Jasmine-Node with Jasmine as Promised
Mocha yes yes yes
CasperJS yes no

QUnit yes with Node-QUnit

Intern yes yes yes
Nodeunit yes yes

Vows no yes

Tape yes yes use blue-tape
Ava no yes yes
Expresso no yes
superseded by Mocha
Node-TAP no yes

Buster.JS yes yes

Whiskey no yes

YUI Test yes yes

Assertion Libraries

Name Stars
Node.js's assert N/A
Should
Chai
Expect
power-assert
Better-Assert
Unexpected

Isolation Tools

Name Stars Description
Nock HTTP mocking and expectations library
Sinon.JS test spies, stubs and mocks for JavaScript
Toxy hackable HTTP proxy to simulate server failure scenarios and network conditions
Rewire easy dependency injection for node.js unit testing
Proxyquire proxies Node.js's require in order to allow overriding dependencies during testing
Mockery simplifying the use of mocks with Node.js
testdouble.js a minimal test double library for TDD with JavaScript

Test Coverage

Name Stars
Istanbul

Browser Testing

Name Stars Notes
PhantomJS
Zombie.js does not support synchronous XHR requests
Nightwatch.js
SlimerJS
WD.js
CodeceptJS
selenium-standalone

Meteor

The Meteor Testing Manual
Name Stars Notes
Velocity the official framework
Tinytest N/A included with Meteor
Munit a wrapper around Tinytest
Tinytest In App use Tinytest to test a Meteor application
numtel:velocity-tinytest use Tinytest with Velocity
velocity-mocha use Mocha in Meteor
sanjo:jasmine use Jasmine in Meteor
meteor-casperjs CasperJS end to end test integration using Velocity
clinical:nightwatch acceptance testing with Selenium and Nightwatch
Laika The author hasn't updated Laika since Velocity was released.
RTD superseded by Velocity
Safety Harness 0 missing repository

Other

My JavaScript-fuzz library generates random values of standard, built-in JavaScript types for fuzz testing.

  • Chance is a minimalist generator of random strings, numbers, etc. to help reduce some monotony particularly while writing automated tests or anywhere else you need anything random.
  • Chakram is a REST API testing framework offering a BDD testing style and fully exploiting promises.
  • Frock is a plugin-based tool for running fake HTTP and socket services.
  • Karma: A simple tool that allows you to execute JavaScript code in multiple real browsers.
  • Preceptor is a test-runner and test-aggregator that runs multiple tests and testing frameworks in parallel, sequential, or a combination there of, aggregating all of the test-results and coverage-reports.
  • SuperTest is a library for testing Node.js HTTP servers using a fluent API.
  • Testling: unit tests in all the browsers
  • Wallaby.js is an intelligent test runner for JavaScript that continuously runs your tests.

View or Post Comments