Project Description
Cactus is a simple test framework for unit testing server-side java code (Servlets, EJBs, Tag Libs, Filters, ...).
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, meaning that tests are executed inside the container.
The Cactus Ecosystem is made of several components:
- The Cactus Framework: This is the heart of Cactus. It is the engine that provides the API to write Cactus tests.
- The Cactus Integration Modules: They are front ends and frameworks that provide easy ways of using the Cactus Framework (Ant scripts, Eclipse plugin, Maven plugin, ...).
- The Cactus Samples: They are simple projects that demonstrate how to write Cactus tests and how to use some of the Integration Modules.
Different kinds of unit tests
There are several kinds of unit testing frameworks. We categorize them in 3 types:- Type 1: code logic unit testing. Probably the best strategy for these tests is to use a Mock Objects (새 창으로 열기) type framework.
- Type 2: integration unit testing. Cactus is typically in this category (we'll let you judge if it is the best or not :)). These tests will exercise the interactions with the container.
- Type 3: functional unit testing. These unit tests will let you test the returned values from your server code. This is for example HttpUnit (새 창으로 열기) (Note that HttpUnit also performs standard functional testing - as opposed to functional unit testing -, which let you test full use cases - a login use case for example, which is comprised of several requests/responses).
Getting Started
To get started, read the Getting Started guide.참고 : http://jakarta.apache.org/cactus/ (새 창으로 열기)
Trackback URL : http://apollo89.com/blog/trackback/379
rss