Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / test / doc / html / boost_test / section_glossary.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Glossary</title>
5 <link rel="stylesheet" href="../boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../index.html" title="Boost.Test">
8 <link rel="up" href="../index.html" title="Boost.Test">
9 <link rel="prev" href="section_faq.html" title="Frequently Asked Questions">
10 <link rel="next" href="change_log.html" title="Change log">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <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>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
27 <a name="boost_test.section_glossary"></a><a class="link" href="section_glossary.html" title="Glossary">Glossary</a>
28 </h2></div></div></div>
29 <p>
30       Here is the list of terms used throughout this documentation.
31     </p>
32 <a name="ref_test_module"></a><h4>
33 <a name="boost_test.section_glossary.h0"></a>
34       <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
35       module</a>
36     </h4>
37 <p>
38       This is a single binary that performs the test. Physically a test module consists
39       of one or more test source files, which can be built into an executable or
40       a dynamic library. A test module that consists of a single test source file
41       is called <span class="emphasis"><em>single-file test module</em></span>. Otherwise it's called
42       <span class="emphasis"><em>multi-file test module</em></span>. Logically, each test module consists
43       of four parts:
44     </p>
45 <div class="orderedlist"><ol class="orderedlist" type="1">
46 <li class="listitem">
47           <a class="link" href="section_glossary.html#test_setup">test setup</a> (or test initialization),
48         </li>
49 <li class="listitem">
50           <a class="link" href="section_glossary.html#test_body">test body</a>
51         </li>
52 <li class="listitem">
53           <a class="link" href="section_glossary.html#test_cleanup">test cleanup</a>
54         </li>
55 <li class="listitem">
56           <a class="link" href="section_glossary.html#test_runner">test runner</a>
57         </li>
58 </ol></div>
59 <p>
60       The test runner part is optional. If a test module is built as an executable,
61       the test runner is built-in. If a test module is built as a dynamic library,
62       it is run by an <a class="link" href="adv_scenarios/external_test_runner.html" title="The external test runner usage variant">external
63       test runner</a>.
64     </p>
65 <div class="warning"><table border="0" summary="Warning">
66 <tr>
67 <td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../doc/src/images/warning.png"></td>
68 <th align="left">Warning</th>
69 </tr>
70 <tr><td align="left" valign="top"><p>
71         The test module should have at least one test-case defined, otherwise it
72         is considered as an error.
73       </p></td></tr>
74 </table></div>
75 <a name="test_body"></a><h4>
76 <a name="boost_test.section_glossary.h1"></a>
77       <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
78       body</a>
79     </h4>
80 <p>
81       This is the part of a test module that actually performs the test. Logically
82       test body is a collection of <a class="link" href="section_glossary.html#test_assertion">test assertions</a>
83       wrapped in <a class="link" href="section_glossary.html#test_case">test cases</a>, which are organized
84       in a <a class="link" href="section_glossary.html#ref_test_tree">test tree</a>.
85     </p>
86 <a name="ref_test_tree"></a><h4>
87 <a name="boost_test.section_glossary.h2"></a>
88       <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
89       tree</a>
90     </h4>
91 <p>
92       This is a hierarchical structure of <a class="link" href="section_glossary.html#test_suite">test suites</a>
93       (non-leaf nodes) and <a class="link" href="section_glossary.html#test_case">test cases</a> (leaf nodes).
94       More details can be found <a class="link" href="tests_organization.html" title="Declaring and organizing tests">here</a>.
95     </p>
96 <a name="ref_test_unit"></a><h4>
97 <a name="boost_test.section_glossary.h3"></a>
98       <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
99       unit</a>
100     </h4>
101 <p>
102       This is a collective name when referred to either a <a class="link" href="section_glossary.html#test_suite">test
103       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
104       section</a> for more details.
105     </p>
106 <a name="test_assertion"></a><h4>
107 <a name="boost_test.section_glossary.h4"></a>
108       <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
109       assertion</a>
110     </h4>
111 <p>
112       This is a single binary condition (binary in a sense that is has two outcomes:
113       pass and fail) checked by a test module.
114     </p>
115 <p>
116       There are different schools of thought on how many test assertions a test case
117       should consist of. Two polar positions are the one advocated by TDD followers
118       - one assertion per test case; and opposite of this - all test assertions within
119       single test case - advocated by those only interested in the first error in
120       a test module. The <span class="emphasis"><em>Unit Test Framework</em></span> supports both approaches.
121     </p>
122 <a name="test_case"></a><h4>
123 <a name="boost_test.section_glossary.h5"></a>
124       <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
125       case</a>
126     </h4>
127 <p>
128       This is an independently monitored function within a test module that consists
129       of one or more test assertions. The term <span class="emphasis"><em>independently monitored</em></span>
130       in the definition above is used to emphasize the fact, that all test cases
131       are monitored independently. An uncaught exception or other normal test case
132       execution termination doesn't cause the testing to cease. Instead the error
133       is caught by the test case execution monitor, reported by the <span class="emphasis"><em>Unit
134       Test Framework</em></span> and testing proceeds to the next test case. Later
135       on you are going to see that this is on of the primary reasons to prefer multiple
136       small test cases to a single big test function.
137     </p>
138 <a name="test_suite"></a><h4>
139 <a name="boost_test.section_glossary.h6"></a>
140       <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
141       suite</a>
142     </h4>
143 <p>
144       This is a container for one or more test cases. The test suite gives you an
145       ability to group test cases into a single referable entity. There are various
146       reasons why you may opt to do so, including:
147     </p>
148 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
149 <li class="listitem">
150           To group test cases per subsystems of the unit being tested.
151         </li>
152 <li class="listitem">
153           To share test case setup/cleanup code.
154         </li>
155 <li class="listitem">
156           To run selected group of test cases only.
157         </li>
158 <li class="listitem">
159           To see test report split by groups of test cases.
160         </li>
161 <li class="listitem">
162           To skip groups of test cases based on the result of another test unit in
163           a test tree.
164         </li>
165 </ul></div>
166 <p>
167       A test suite can also contain other test suites, thus allowing a hierarchical
168       test tree structure to be formed. The <span class="emphasis"><em>Unit Test Framework</em></span>
169       requires the test tree to contain at least one test suite with at least one
170       test case. The top level test suite - root node of the test tree - is called
171       the master test suite.
172     </p>
173 <a name="test_setup"></a><h4>
174 <a name="boost_test.section_glossary.h7"></a>
175       <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
176       setup</a>
177     </h4>
178 <p>
179       This is the part of a test module that is responsible for the test preparation.
180       It includes the following operations that take place prior to a start of the
181       test:
182     </p>
183 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
184 <li class="listitem">
185           The <span class="emphasis"><em>Unit Test Framework</em></span> initialization
186         </li>
187 <li class="listitem">
188           Test tree construction
189         </li>
190 <li class="listitem">
191           Global test module setup code
192         </li>
193 <li class="listitem">
194           <span class="emphasis"><em>Per test case</em></span> setup code, invoked for every test case
195           it's assigned to, is also attributed to the test initialization, even though
196           it's executed as a part of the test case.
197         </li>
198 </ul></div>
199 <a name="test_cleanup"></a><h4>
200 <a name="boost_test.section_glossary.h8"></a>
201       <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
202       cleanup</a>
203     </h4>
204 <p>
205       This is the part of test module that is responsible for cleanup operations.
206     </p>
207 <a name="test_fixture"></a><h4>
208 <a name="boost_test.section_glossary.h9"></a>
209       <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
210       fixture</a>
211     </h4>
212 <p>
213       Matching setup and cleanup operations are frequently united into a single entity
214       called test fixture.
215     </p>
216 <a name="test_runner"></a><h4>
217 <a name="boost_test.section_glossary.h10"></a>
218       <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
219       runner</a>
220     </h4>
221 <p>
222       This is an <span class="emphasis"><em>orchestrator</em></span> or a <span class="emphasis"><em>driver</em></span>
223       that, given the test tree, ensures the test tree is initialized, tests are
224       executed and necessary reports generated. For more information <a class="link" href="adv_scenarios/test_module_runner_overview.html" title="Test module runner">see
225       here</a>.
226     </p>
227 <a name="test_log"></a><h4>
228 <a name="boost_test.section_glossary.h11"></a>
229       <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
230       log</a>
231     </h4>
232 <p>
233       This is the record of all events that occur during the testing.
234     </p>
235 <a name="test_report"></a><h4>
236 <a name="boost_test.section_glossary.h12"></a>
237       <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
238       report</a>
239     </h4>
240 <p>
241       This is the report produced by the <span class="emphasis"><em>Unit Test Framework</em></span>
242       after the testing is completed, that indicates which test cases/test suites
243       passed and which failed.
244     </p>
245 </div>
246 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
247 <td align="left"></td>
248 <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2019 Boost.Test
249       contributors<p>
250         Distributed under the Boost Software License, Version 1.0. (See accompanying
251         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>)
252       </p>
253 </div></td>
254 </tr></table>
255 <hr>
256 <div class="spirit-nav">
257 <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>
258 </div>
259 </body>
260 </html>