Up: MicroBenchmark Concepts [Contents][Index]
The execution flow of a test case is composed of three sequential stages:
The Set Up stage receives the execution state object as a parameter and allocates the fixture for the test code and prepares the environment for its execution.
An automatic test receives the allocated fixture directly and does not have direct access to the execution state. It is invoked repeatedly by the framework and measures are sampled after certain amount of iterations.
A directed test receives the framework execution state object (see State Reference) as its parameter, where the allocated fixture by the previous stage is stored. This is the concept used by Google Benchmark, where code must manually loop on the state.
The Tear Down stage releases the resources allocated for the fixture and performs any other cleanup needed.