- XUnit
Various code-driven testing frameworks have come to be known collectively as
xUnit . Such frameworks are based on a design byKent Beck , originally implemented forSmalltalk asSUnit , but are now available for many programming languages and development platforms.xUnit Design
The overall design of xUnit frameworks depends on several components.
Test Fixtures
A test fixture is the set of
precondition s or state needed for a test to run. Also known as a test context.Test Suites
A test suite is a set of tests that all share the same fixture.
Test Execution
The execution of an individual unit test proceeds as follows:The setup() and teardown() methods serve to initialize and clean up test fixtures.
Assertions
An
assertion is a function or macro that verifies the behavior of the unit under test. Failure of an assertion typically throws an exception, aborting the execution of the current test.See also
*
List of unit testing frameworks External links
* [http://www.xprogramming.com/testfram.htm Kent Beck's original testing framework paper]
* [http://www.xprogramming.com/software.htm Other list of various unit testing frameworks]
* [http://opensourcetesting.org/ OpenSourceTesting.org lists many unit testing frameworks, performance testing tools and other tools programmers/developers may find useful]
* [http://xunitpatterns.com/ Test automation patterns for writing tests/specs in xUnit.]
* [http://www.martinfowler.com/bliki/Xunit.html Martin Fowler on the background of xUnit.]
Wikimedia Foundation. 2010.