boost/libs/test/doc/html/boost_test/section_glossary.html
2021-10-05 21:37:46 +02:00

260 lines
14 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Glossary</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="Boost.Test">
<link rel="up" href="../index.html" title="Boost.Test">
<link rel="prev" href="section_faq.html" title="Frequently Asked Questions">
<link rel="next" href="change_log.html" title="Change log">
</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="section_faq.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="change_log.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.section_glossary"></a><a class="link" href="section_glossary.html" title="Glossary">Glossary</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.section_glossary.h0"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_module"></a></span><a class="link" href="section_glossary.html#boost_test.section_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="section_glossary.html#test_setup">test setup</a> (or test initialization),
</li>
<li class="listitem">
<a class="link" href="section_glossary.html#test_body">test body</a>
</li>
<li class="listitem">
<a class="link" href="section_glossary.html#test_cleanup">test cleanup</a>
</li>
<li class="listitem">
<a class="link" href="section_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 <a class="link" href="adv_scenarios/external_test_runner.html" title="The external test runner usage variant">external
test runner</a>.
</p>
<div class="warning"><table border="0" summary="Warning">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../doc/src/images/warning.png"></td>
<th align="left">Warning</th>
</tr>
<tr><td align="left" valign="top"><p>
The test module should have at least one test-case defined, otherwise it
is considered as an error.
</p></td></tr>
</table></div>
<a name="test_body"></a><h4>
<a name="boost_test.section_glossary.h1"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_body"></a></span><a class="link" href="section_glossary.html#boost_test.section_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="section_glossary.html#test_assertion">test assertions</a>
wrapped in <a class="link" href="section_glossary.html#test_case">test cases</a>, which are organized
in a <a class="link" href="section_glossary.html#ref_test_tree">test tree</a>.
</p>
<a name="ref_test_tree"></a><h4>
<a name="boost_test.section_glossary.h2"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_tree"></a></span><a class="link" href="section_glossary.html#boost_test.section_glossary.test_tree">Test
tree</a>
</h4>
<p>
This is a hierarchical structure of <a class="link" href="section_glossary.html#test_suite">test suites</a>
(non-leaf nodes) and <a class="link" href="section_glossary.html#test_case">test cases</a> (leaf nodes).
More details can be found <a class="link" href="tests_organization.html" title="Declaring and organizing tests">here</a>.
</p>
<a name="ref_test_unit"></a><h4>
<a name="boost_test.section_glossary.h3"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_unit"></a></span><a class="link" href="section_glossary.html#boost_test.section_glossary.test_unit">Test
unit</a>
</h4>
<p>
This is a collective name when referred to either a <a class="link" href="section_glossary.html#test_suite">test
suite</a> or <a class="link" href="section_glossary.html#test_case">test cases</a>. See <a class="link" href="tests_organization.html" title="Declaring and organizing tests">this
section</a> for more details.
</p>
<a name="test_assertion"></a><h4>
<a name="boost_test.section_glossary.h4"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_assertion"></a></span><a class="link" href="section_glossary.html#boost_test.section_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>Unit Test Framework</em></span> supports both approaches.
</p>
<a name="test_case"></a><h4>
<a name="boost_test.section_glossary.h5"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_case"></a></span><a class="link" href="section_glossary.html#boost_test.section_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>Unit
Test Framework</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.section_glossary.h6"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_suite"></a></span><a class="link" href="section_glossary.html#boost_test.section_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>Unit Test Framework</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.section_glossary.h7"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_setup"></a></span><a class="link" href="section_glossary.html#boost_test.section_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>Unit Test Framework</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.section_glossary.h8"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_cleanup"></a></span><a class="link" href="section_glossary.html#boost_test.section_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.section_glossary.h9"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_fixture"></a></span><a class="link" href="section_glossary.html#boost_test.section_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.section_glossary.h10"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_runner"></a></span><a class="link" href="section_glossary.html#boost_test.section_glossary.test_runner">Test
runner</a>
</h4>
<p>
This is an <span class="emphasis"><em>orchestrator</em></span> or a <span class="emphasis"><em>driver</em></span>
that, given the test tree, ensures the test tree is initialized, tests are
executed and necessary reports generated. For more information <a class="link" href="adv_scenarios/test_module_runner_overview.html" title="Test module runner">see
here</a>.
</p>
<a name="test_log"></a><h4>
<a name="boost_test.section_glossary.h11"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_log"></a></span><a class="link" href="section_glossary.html#boost_test.section_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.section_glossary.h12"></a>
<span class="phrase"><a name="boost_test.section_glossary.test_report"></a></span><a class="link" href="section_glossary.html#boost_test.section_glossary.test_report">Test
report</a>
</h4>
<p>
This is the report produced by the <span class="emphasis"><em>Unit Test Framework</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 © 2001-2020 Boost.Test contributors<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="section_faq.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="change_log.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>