2
0
mirror of https://github.com/boostorg/test.git synced 2026-02-19 14:52:09 +00:00
Files
test/doc/v2/html/boost_test/glossary.html
2014-02-11 17:32:01 +01:00

273 lines
13 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Glossary... or what's your name?</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../index.html" title="Boost.Test">
<link rel="up" href="../index.html" title="Boost.Test">
<link rel="prev" href="frequently_asked_questions.html" title="Frequently Asked Questions">
<link rel="next" href="portability.html" title="Portability">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="frequently_asked_questions.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="portability.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_test.glossary"></a><a class="link" href="glossary.html" title="Glossary... or what's your name?">Glossary... or what's your name?</a>
</h2></div></div></div>
<p>
Here is the list of terms used throughout this documentation.
</p>
<a name="ref_test_module"></a><h4>
<a name="boost_test.glossary.h0"></a>
<span class="phrase"><a name="boost_test.glossary.test_module"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_module">Test
module</a>
</h4>
<p>
This is a single binary that performs the test. Physically a test module consists
of one or more test source files, which can be built into an executable or
a dynamic library. A test module that consists of a single test source file
is called <span class="emphasis"><em>single-file test module</em></span>. Otherwise it's called
<span class="emphasis"><em>multi-file test module</em></span>. Logically, each test module consists
of four parts:
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<a class="link" href="glossary.html#test_setup">test setup</a> (or test initialization),
</li>
<li class="listitem">
<a class="link" href="glossary.html#test_body">test body</a>
</li>
<li class="listitem">
<a class="link" href="glossary.html#test_cleanup">test cleanup</a>
</li>
<li class="listitem">
<a class="link" href="glossary.html#test_runner">test runner</a>
</li>
</ol></div>
<p>
The test runner part is optional. If a test module is built as an executable,
the test runner is built-in. If a test module is built as a dynamic library,
it is run by an external test runner.
</p>
<a name="test_body"></a><h4>
<a name="boost_test.glossary.h1"></a>
<span class="phrase"><a name="boost_test.glossary.test_body"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_body">Test
body</a>
</h4>
<p>
This is the part of a test module that actually performs the test. Logically
test body is a collection of <a class="link" href="glossary.html#test_assertion">test assertions</a>
wrapped in <a class="link" href="glossary.html#test_case">test cases</a>, which are organized
in a <a class="link" href="glossary.html#test_tree">test tree</a>.
</p>
<a name="test_tree"></a><h4>
<a name="boost_test.glossary.h2"></a>
<span class="phrase"><a name="boost_test.glossary.test_tree"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_tree">Test
tree</a>
</h4>
<p>
This is a hierarchical structure of <a class="link" href="glossary.html#test_suite">test suites</a>
(non-leaf nodes) and <a class="link" href="glossary.html#test_case">test cases</a> (leaf nodes).
</p>
<a name="test_unit"></a><h4>
<a name="boost_test.glossary.h3"></a>
<span class="phrase"><a name="boost_test.glossary.test_unit"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_unit">Test
unit</a>
</h4>
<p>
This is a collective name when referred to either a <a class="link" href="glossary.html#test_suite">test
suite</a> or <a class="link" href="glossary.html#test_case">test cases</a>.
</p>
<a name="test_assertion"></a><h4>
<a name="boost_test.glossary.h4"></a>
<span class="phrase"><a name="boost_test.glossary.test_assertion"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_assertion">Test
assertion</a>
</h4>
<p>
This is a single binary condition (binary in a sense that is has two outcomes:
pass and fail) checked by a test module.
</p>
<p>
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 <span class="emphasis"><em>UTF</em></span> supports both approaches.
</p>
<a name="test_case"></a><h4>
<a name="boost_test.glossary.h5"></a>
<span class="phrase"><a name="boost_test.glossary.test_case"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_case">Test
case</a>
</h4>
<p>
This is an independently monitored function within a test module that consists
of one or more test assertions. The term <span class="emphasis"><em>independently monitored</em></span>
in the definition above is used to emphasize the fact, that all test cases
are monitored independently. An uncaught exception or other normal test case
execution termination doesn't cause the testing to cease. Instead the error
is caught by the test case execution monitor, reported by the <span class="emphasis"><em>UTF</em></span>
and testing proceeds to the next test case. Later on you are going to see that
this is on of the primary reasons to prefer multiple small test cases to a
single big test function.
</p>
<a name="test_suite"></a><h4>
<a name="boost_test.glossary.h6"></a>
<span class="phrase"><a name="boost_test.glossary.test_suite"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_suite">Test
suite</a>
</h4>
<p>
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:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
To group test cases per subsystems of the unit being tested.
</li>
<li class="listitem">
To share test case setup/cleanup code.
</li>
<li class="listitem">
To run selected group of test cases only.
</li>
<li class="listitem">
To see test report split by groups of test cases.
</li>
<li class="listitem">
To skip groups of test cases based on the result of another test unit in
a test tree.
</li>
</ul></div>
<p>
A test suite can also contain other test suites, thus allowing a hierarchical
test tree structure to be formed. The <span class="emphasis"><em>UTF</em></span> 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.
</p>
<a name="test_setup"></a><h4>
<a name="boost_test.glossary.h7"></a>
<span class="phrase"><a name="boost_test.glossary.test_setup"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_setup">Test
setup</a>
</h4>
<p>
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:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
The <span class="emphasis"><em>UTF</em></span> initialization
</li>
<li class="listitem">
Test tree construction
</li>
<li class="listitem">
Global test module setup code
</li>
<li class="listitem">
<span class="emphasis"><em>Per test case</em></span> 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.
</li>
</ul></div>
<a name="test_cleanup"></a><h4>
<a name="boost_test.glossary.h8"></a>
<span class="phrase"><a name="boost_test.glossary.test_cleanup"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_cleanup">Test
cleanup</a>
</h4>
<p>
This is the part of test module that is responsible for cleanup operations.
</p>
<a name="test_fixture"></a><h4>
<a name="boost_test.glossary.h9"></a>
<span class="phrase"><a name="boost_test.glossary.test_fixture"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_fixture">Test
fixture</a>
</h4>
<p>
Matching setup and cleanup operations are frequently united into a single entity
called test fixture.
</p>
<a name="test_runner"></a><h4>
<a name="boost_test.glossary.h10"></a>
<span class="phrase"><a name="boost_test.glossary.test_runner"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_runner">Test
runner</a>
</h4>
<p>
This is an <span class="emphasis"><em>executive manager</em></span> that runs the show. The test
runner's functionality should include the following interfaces and operations:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Entry point to a test module. This is usually either the function <code class="computeroutput"><span class="identifier">main</span><span class="special">()</span></code>
itself or single function that can be invoked from it to start testing.
</li>
<li class="listitem">
Initialize the <span class="emphasis"><em>UTF</em></span> based on runtime parameters
</li>
<li class="listitem">
Select an output media for the test log and the test results report
</li>
<li class="listitem">
Select test cases to execute based on runtime parameters
</li>
<li class="listitem">
Execute all or selected test cases
</li>
<li class="listitem">
Produce the test results report
</li>
<li class="listitem">
Generate a test module result code.
</li>
</ul></div>
<p>
An advanced test runner may provide additional features, including interactive
<span class="emphasis"><em>GUI</em></span> interfaces, test coverage and profiling support.
</p>
<a name="test_log"></a><h4>
<a name="boost_test.glossary.h11"></a>
<span class="phrase"><a name="boost_test.glossary.test_log"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_log">Test
log</a>
</h4>
<p>
This is the record of all events that occur during the testing.
</p>
<a name="test_report"></a><h4>
<a name="boost_test.glossary.h12"></a>
<span class="phrase"><a name="boost_test.glossary.test_report"></a></span><a class="link" href="glossary.html#boost_test.glossary.test_report">Test
report</a>
</h4>
<p>
This is the report produced by the <span class="emphasis"><em>UTF</em></span> after the testing
is completed, that indicates which test cases/test suites passed and which
failed.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2001-2013 Gennadiy Rozental<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="frequently_asked_questions.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="portability.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>