JSNUnit is a very small unit testing framework written in JavaScript. It is free to download and use. It tests JavaScript code within the environment in which it will be executing. It executes browser code in the browser and server code within an ASP .NET server environment in JScript.
It was designed for developers who practice Test-Driven Development in just a browser environment, or in a browser and ASP .NET environment.
The way it works is that you write your tests in a specific format that can be detected by a “test runner” web page that comes with JSNUnit.
JSNUnit is not to be confused with JUnit or JSUnit. The name JSNUnit was chosen because NUnit stands for a test framework in the xUnit family of frameworks that runs on .NET. JSUnit is an xUnit framework for testing JavaScript alone. JSNunit is a mix of both NUnit and JSUnit in that it tests JavaScript running in a .NET environment.
There is a page you can visit to learn how to install an environment for Test-Driven Development with JSNUnit. You can also see a simple example of how to do Test-Driven Development in the JSNUnit environment. For more advanced programmers, you can also find out more about mocking ASP .NET objects.
Copyright 2007 Troy Taft
All rights reserved, you may print this article for your personal use.