Ax boost_unit_test_framework example

Without further ado, let's define terms regularly used by the UTF .

The test module

This is a single binary condition (binary in a sense that is has two outcomes: pass and fail) checked by a test module.

There are different schools of thought on how many test assertions a test case should consist of. Two polar positions are the one advocated by TDD followers - one assertion per test case; and opposite of this - all test assertions within single test case - advocated by those only interested in the first error in a test module. The UTF supports both approaches.

This is a container for one or more test cases. The test suite gives you an ability to group test cases into a single referable entity. There are various reasons why you may opt to do so, including:

A test suite can also contain other test suites, thus allowing a hierarchical test tree structure to be formed. The UTF requires the test tree to contain at least one test suite with at least one test case. The top level test suite - root node of the test tree - is called the master test suite.

This is the part of a test module that is responsible for the test preparation. It includes the following operations that take place prior to a start of the test:

Per test case" setup code, invoked for every test case it's assigned to, is also attributed to the test initialization, even though it's executed as a part of the test case.

The test cleanup

The test fixture

The test runner

This is an "executive manager" that runs the show. The test runner's functionality should include the following interfaces and operations:

An advanced test runner may provide additional features, including interactive GUI interfaces, test coverage and profiling support.

The test results report