yaktest: Bare bones unit-testing framework for C++
yaktest is a small (just a few K) library for C++ which consists of three classes: test_case, test_problem, and test_result. A fourth class, text_test_interpreter, takes the test_result data and spews it to stdout. The test results are in Emacs-compatible form (filename:line_number:description).
Jakarta Cactus: Unit-testing server-side Java
Cactus is a simple test framework for unit testing server-side java code (Servlets, EJBs, Tag Libs, Filters, etc.). The intent of Cactus is to lower the cost of writing tests for server-side code. It uses JUnit and extends it. Cactus implements an in-container strategy.
link
ASUnitForAppleScript: Unit-testing framework for AppleScript
AsUnitForAppleScript is a testing framework developed for use with the AppleScript language. It is based primarily on JavaUnit and to some extent, SmalltalkUnit.
Keyword: AppleScriptUnit
link
ZopeTestCase: Unit-testing tool for the Zope environment
ZopeTestCase is an attempt to make writing unit and regression tests in Zope a more rewarding experience. The package deals with all the plumbing required, and leaves the coder with writing the tests — and the tests only.
It is built on PyUnit and the Testing package coming with Zope.
Keyword: ZopeUnit
link
AUnit: Unit-testing framework for ADA
AUnit is a set of AdaLanguage packages based on the xUnit family of unit test frameworks. It’s intended as a developer’s tool to facilitate confident writing and evolution of Ada software. It is purposely lightweight, as one of its main goals is to make it easy to develop and run unit tests, rather than to generate artifacts for process management. The framework supports easy composition of sets of unit tests to provide flexibility in determining what tests to run for a given purpose.
Keyword: ADAUnit
link
XMLUnit
HTTPUnit: Unit-testing framework for the HTTP protocol model
Combined with JavaUnit, HTTPUnit allows automated testing of web applications, with the tests written in Java. Obviously, it doesn’t matter what language the web application is in. It should work fine for Java servlets, mod_perl, cgi, JSP, ASP, CFM or anything else that sends HTML to a browser.
HTMLUnit: Unit-testing framework for HTML returned document model
HtmlUnit is a java unit testing framework for testing web based applications. It is similar in concept to HttpUnit but is very different in implementation. Which one is better for you depends on how you like to write your tests. HttpUnit models the HTTP protocol, HtmlUnit models the returned document.
link
JsUnit: Unit-testing framework for JavaScript
JsUnit is a Unit Testing framework for client-side (in-browser) JavaScript. It is essentially a port of JUnit to JavaScript.
See also: Yahoo! discussion group on JsUnit
link
PerlUnit: Unit-testing framework for Perl
Unit-testing tool for test-driven development in Perl.
link
XMLTestSuite
XmlTestSuite provides a powerful way to test web applications.
Check site structure:
HTML pages are well formed and links are valid
Check the content of pages:
Use Javascript variables, XPath expressions, database queries
Check the way the site works:
Run test scanarios, written in XML
link
NUnitASP: ASP .NET Unit-testing
NUnitAsp is based on the principle that testing web pages should use the same concepts as creating them. When you use NUnitAsp, you use classes and IDs similar to those you used when creating the web page you are testing.
In this tutorial, we’ll walk you through the process of creating a simple one-page web application and tests.
Authors: Jim Little and Andrew Enfield
See also: Quick Start Guide
link
JUnitEE: HTML output for Servlets
JUnitEE provides a TestRunner which outputs HTML and a servlet which can be used as an entry point to your test cases. Building your test harness as a standard J2EE web application means:
– Your tests are packaged conveniently into a .war file which can easily be moved between servers; you can leave the .war file in the main .ear file and simply avoid enabling the test web application on the production server.
– Your test classes will be dynamically reloaded by the app server (assuming your server supports this).
– Your test cases look just like your production code, and can use the same beans (or whatever) you use as a facade for your EJBs.
link
TagUnit: Unit-testing custom JSP tags
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.
Even with tools like Cactus, JUnitEE and HttpUnit, testing Java Servlets and JSP pages is hard, particularly if they contain specific business or presentation logic that needs to be tested. Best practices around J2EE development suggest that logic should be encapsulated in JavaBeans or JSP custom tags for better separation of concerns, maintainability, reusability and to facilitate easier testing. Although JUnit can be used to test JavaBeans, testing custom tags by simply invoking their methods doesn’t make sense. Custom tags are components and therefore need to be tested at that level, in the way that they would normally be used from within a JSP page.
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.
link
Mock Objects
The Mock Objects project is a generic unit testing framework whose goal is to facilitate developing unit tests in the mock object style. The goal of this project is to provide a core mock objects framework, a methodology for developing and using mock objects, a default set of mock implementation for the standard Java platform APIs, mock implementations for more specialised libraries.
link
The Grinder (Java load-testing framework)
The Grinder, a Java load-testing framework freely available under a BSD-style open-source license, makes it easy to orchestrate the activities of a test script in many processes across many machines, using a graphical console application. Test scripts make use of client code embodied in Java plug-ins. Most users of The Grinder do not write plug-ins themselves, instead they use one of the supplied plug-ins. The Grinder comes with a mature plug-in for testing HTTP services, as well as a tool which allows HTTP scripts to be automatically recorded.
link
StrutsTestCase for JUnit v2.0
StrutsTestCase for JUnit is an extension of the standard JUnit TestCase class that provides facilities for testing code based on the Struts framework. StrutsTestCase provides both a Mock Object approach and a Cactus approach to actually run the Struts ActionServlet, allowing you to test your Struts code with or without a running servlet engine. Because StrutsTestCase uses the ActionServlet controller to test your code, you can test not only the implementation of your Action objects, but also your mappings, form beans, and forwards declarations. And because StrutsTestCase already provides validation methods, it’s quick and easy to write unit test cases.
Author: Deryl Seale
link
JUnit-addons Runner
Junit-addons Runner is a Junit runner that is especially targeted at integration tests, where external resources are too expensive to acquire before each test. Some of JUnit-addons Runner features include:
- custom listeners;
- resources (like a connection to a database) shared by tests;
- properties split for the runner and tests;
- custom monitor (to manage the execution of the tests).
This runner is very flexible (IMO) and was designed especially for
integration tests.
Programmer: Vladimir R. Bossicard (site)
See also: JUnit-addons documentation
link
Polygenix White Paper on Object Substitution
Mock objects are a powerful and flexible mechanism for substituting an imposter as a parameter to the class under test. In many cases, however, the collaborations with the class under test are not parameterized — for example: an attribute that is not supplied to the constructor; objects that are created or referenced via static factories; or new instances of collaborations that are created by the class.
Object Substitution is a technique developed by Polygenix to enable the developer to replace such collaborations with the class under test without modifying the original source code.
Abbot – Java GUI testing framework using JUnit
Abbot (A Better Bot) is a Java GUI testing framework. The framework may be invoked directly in hand-coded Java tests, or more simply using XML-based scripts. Both methods are designed to be used with the JUnit testing framework. You can launch a GUI, invoke arbitrary user actions on it, and examine its state. The scripts may be invoked from JUnit or with minor modification any other testing environment.
JUnit
JUnit is a regression testing framework written by Erich Gamma and Kent Beck. It is used by the developer who implements unit tests in Java. Most famous of XUnits, JUnit is Open Source Software.
link