Unit Testing and Mocking Tools: C/C++, Java, JavaScript, .NET, PHP, Python, Ruby, Flex

 

Javascript Unit Tests Tools

HttpUnit

HttpUnit makes easy to bypass the browser and access your site from a program. Written in Java, HttpUnit emulates the relevant portions of browser behavior, including form submission, JavaScript, basic http authentication, cookies and automatic page redirection, and allows Java test code to examine returned pages either as text, an XML DOM, or containers of forms, tables, and links.


Jasmine

Jasmine is yet another JavaScript testing framework. It's heavily influenced by JSSpec, ScrewUnit & JSpec, which are all influenced by RSpec. But each of those was lacking in some way: JSSpec & ScrewUnit require a DOM. JSpec's DOM-less assumption was a great start, but it needed asynchronous support.


jqMock

jqMock is a lightweight javascript Mock Framework for the jqUnit testing framework. jqMock allows functions in dependent functions such as native alert dialogs to be mocked, so that your own code can be tested in isolation. jqMock has comprehensive expectation support, with complex argument matching criteria, ordered/unordered expectations, multiplicity control, intercepting return values and throwing exceptions.


JSMock

JSMock is a fully featured Mock Object library for JavaScript that provides the necessary tools to do effective interactive based testing. JSMock provides expectation recording and matching, and has the ability to return, throw, and stub on object method calls. The interface is simple and easy to use, which makes testing easy.


JSNSpec

A JavaScript on .Net Specification framework that supports Behavior-Driven Development (BDD).


JSNUnit

JavaScript Client and ASP .NET Server Testing Framework that you can use if you are looking for a way to do Test-Driven Development on in-line ASP .NET code


JSpec

Test JavaScript functionality extremely quickly using the intuitive, minimalistic, JSpec framework. This framework aims to provide nearly no installation hassle, an extremely low learning curve, and high reliability for testing JavaScript behaviors.


JSSpec

JSSpec is a JavaScript Behavior Driven Development framework.


JsTestDriver

The goal of JsTestDriver is to build a JavaScript test runner which: 1. easily integrates with continuous builds systems and 2. allows running tests on multiple browsers quickly to ease TDD style development


JsTester

JsTester allows validation of javaScript code inside java. It provides a group of assert methods like JUnit's Assert, it also supports the validations described in http://javascript.crockford.com/remedial.html, and the ability to use your own validations (unary & binary predicates). The project provides two ways of creating your tests: by inheritance (JsTestCase), and by composition (JsTester). Use JsTestCase as you would normally use any extension of TestCase. Use JsTester with TestNG or JUnit4 and annotations, or inside another TestCase hierarchy.


JsUnit

JsUnit is a Unit Testing framework for client-side (in-browser) JavaScript. It is essentially a port of JUnit to JavaScript. Also included is a platform for automating the execution of tests on multiple browsers and mutiple machines running different OSs.


js_runit

An unit tester for Javascript runs from Rails


NoseJS

NoseJS is a Nose plugin for integrating JavaScript tests into a Python test suite.


Opera Dragonfly

Opera Dragonfly allows you to develop more quickly and easily by providing tools to debug your JavaScript and to inspect the DOM, CSS, network traffic and data stores. Developing for mobile has never been easier with Opera Dragonfly’s built-in remote debugging.


QUnit

QUnit is the unit testrunner for the jQuery project.


RhinoUnit

RhinoUnit is a Javascript testing framework for use within ANT. It has all the usual assertions, as well as new ones to ensure that functions are called, and checks to stop your code polluting the global namespace (don't forget your vars!) as well as integrated JSLint to keep your code look consistent (and pick up on some potential problems)


Script.aculo.us

script.aculo.us is a JavaScript library built on the Prototype Javascript Framework. script.aculo.us provides dynamic visual effects and user interface elements via the Document Object Model.


Speed Tracer

Speed Tracer is a tool to help you identify and fix performance problems in your web applications. It visualizes metrics that are taken from low level instrumentation points inside of the browser and analyzes them as your application runs. Speed Tracer is available as a Chrome extension and works on all platforms where extensions are currently supported (Windows and Linux).


TagUnit

In the same way that JUnit allows us to write unit tests for Java classes, TagUnit allows us to unit test JSP custom tags, inside the container. In essence, TagUnit is a tag library for testing custom tags within JSP pages. TagUnit provides a way to perform assertions on the content that custom tags generate and the side-effects that they have on the environment such as the introduction of scoped (request/page/session/application) attributes, cookies and so on. In addition to this, assertions can be made on the constraints specified within the tag library descriptor file that give us a way to verify the contract that a tag provides. In just a four line JSP page, TagUnit can automatically perform tests such as asserting whether the tag handler class is loadable and that it has setter methods for all declared attributes. To supplement this, user defined tests provide a way to perform assertions on the description of a tag, such as its body content and the details of any attributes.


Venkman

Venkman is the code name for Mozilla's JavaScript Debugger. Venkman aims to provide a powerful JavaScript debugging environment for Mozilla based browsers namely Firefox 2.x, the Netscape 7.x series of browsers, Netscape 9.x series, Mozilla Seamonkey 1.x and Mozilla Seamonkey 2.x. It does not include Gecko-based browsers such as K-Meleon 1.x, Galeon 2.x and Netscape 8.x. The debugger is available as an add-on package in XPI format. Venkman JavaScript Debugger has been provided as part of the Mozilla install distribution since October 3rd 2001.


Yeti

Yeti is a command-line tool for launching JavaScript unit tests in a browser and reporting the results without leaving your terminal. Yeti is designed to work with existing unmodified YUI-based tests. Yeti is designed to help you run tests before you commit. It compliments existing CI tools like Selenium and Hudson which run tests post-commit. Yeti is not a replacement for those tools.