mirror of
https://github.com/boostorg/test.git
synced 2026-02-17 14:12:08 +00:00
219 lines
10 KiB
HTML
219 lines
10 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
<title></title>
|
|
<link rel="stylesheet" href="../../../style/style.css" type="text/css">
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
|
<link rel="home" href="../../index.html" title="Boost Test Library">
|
|
<link rel="up" href="../user-guide.html" title="Unit Test Framework: User's guide">
|
|
<link rel="prev" href="usage-variants/extern-test-runner.html" title="External test runner variant of the UTF">
|
|
<link rel="next" href="../usage-recommendations.html" title="The unit test framework usage recommendations">
|
|
<script language="JavaScript1.2" src="../../../js/boost-test.js"></script>
|
|
</head>
|
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
<table width="100%"><tr>
|
|
<td width="10%"><a href="../../index.html"><img alt="Home" width="229" height="61" border="0" src="../../../../../../libs/test/doc/img/boost.test.logo.png"></a></td>
|
|
<td valign="middle" align="left"> > <a href="../../utf.html">The Unit Test Framework</a><a href="../../execution-monitor.html">
|
|
>
|
|
</a><a href="../user-guide.html">User's guide</a><a href="../usage-recommendations.html">
|
|
>
|
|
</a><b>Glossary</b>
|
|
</td>
|
|
<td><div class="spirit-nav">
|
|
<a href="usage-variants/extern-test-runner.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a href="../usage-recommendations.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="section">
|
|
<div class="titlepage"></div>
|
|
<div class="glossary">
|
|
<div class="titlepage"><div><div><h5 class="title">
|
|
<a name="id549547"></a>Glossary … or what's your name?</h5></div></div></div>
|
|
<p class="first-line-indented">
|
|
Here is the list of terms used throughout this documentation.
|
|
</p>
|
|
<dl>
|
|
<dt>
|
|
<a name="test-module.def"></a><em class="firstterm">The test module</em>
|
|
</dt>
|
|
<dd><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 <em class="firstterm"><a name="single-file-test-module.def"></a>single-file test module</em>. Otherwise
|
|
it's called <em class="firstterm"><a name="multi-file-test-module.def"></a>multi-file test module</em>. Logically a test
|
|
module consists of four parts: <a class="link" href="glossary.html#test-setup.def" title="The test setup">test setup</a> (or test initialization),
|
|
<a class="link" href="glossary.html#test-body.def" title="The test body">test body</a>, <a class="link" href="glossary.html#test-cleanup.def" title="The test cleanup">test cleanup</a> and
|
|
<a class="link" href="glossary.html#test-runner.def" title="The test runner">test runner</a>. 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></dd>
|
|
<dt>
|
|
<a name="test-body.def"></a><em class="firstterm">The test body</em>
|
|
</dt>
|
|
<dd><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.def" title="Test assertion">test assertions</a> wrapped in
|
|
<a class="link" href="glossary.html#test-case.def" title="The test case">test cases</a>, which are organized in a <a class="link" href="glossary.html#test-tree.def" title="The test tree">test tree
|
|
</a>.
|
|
</p></dd>
|
|
<dt>
|
|
<a name="test-tree.def"></a><em class="firstterm">The test tree</em>
|
|
</dt>
|
|
<dd><p>
|
|
This is a hierarchical structure of <a class="link" href="glossary.html#test-suite.def" title="The test suite">test suites</a> (non-leaf nodes) and
|
|
<a class="link" href="glossary.html#test-case.def" title="The test case">test cases</a> (leaf nodes).
|
|
</p></dd>
|
|
<dt>
|
|
<a name="test-unit.def"></a><em class="firstterm">The test unit</em>
|
|
</dt>
|
|
<dd><p>
|
|
This is a collective name when referred to either <a class="link" href="glossary.html#test-suite.def" title="The test suite">test suite</a> or
|
|
<a class="link" href="glossary.html#test-case.def" title="The test case">test case</a>
|
|
</p></dd>
|
|
<dt>
|
|
<a name="test-assertion.def"></a><em class="firstterm">Test assertion</em>
|
|
</dt>
|
|
<dd>
|
|
<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 <acronym class="acronym">UTF</acronym> supports both approaches.
|
|
</p>
|
|
</dd>
|
|
<dt>
|
|
<a name="test-case.def"></a><em class="firstterm">The test case</em>
|
|
</dt>
|
|
<dd><p>
|
|
This is an independently monitored function within a test module that
|
|
consists of one or more test assertions. The term "independently monitored" 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 <acronym class="acronym">UTF</acronym> 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></dd>
|
|
<dt>
|
|
<a name="test-suite.def"></a><em class="firstterm">The test suite</em>
|
|
</dt>
|
|
<dd>
|
|
<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 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 <acronym class="acronym">UTF</acronym> 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>
|
|
</dd>
|
|
<dt>
|
|
<a name="test-setup.def"></a><em class="firstterm">The test setup</em>
|
|
</dt>
|
|
<dd>
|
|
<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 type="disc">
|
|
<li class="listitem">
|
|
The <acronym class="acronym">UTF</acronym> initialization
|
|
</li>
|
|
<li class="listitem">
|
|
Test tree construction
|
|
</li>
|
|
<li class="listitem">
|
|
Global test module setup code
|
|
</li>
|
|
</ul></div>
|
|
<p>
|
|
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.
|
|
</p>
|
|
</dd>
|
|
<dt>
|
|
<a name="test-cleanup.def"></a><em class="firstterm">The test cleanup</em>
|
|
</dt>
|
|
<dd><p>
|
|
This is the part of test module that is responsible for cleanup operations.
|
|
</p></dd>
|
|
<dt>
|
|
<a name="test-fixture.def"></a><em class="firstterm">The test fixture</em>
|
|
</dt>
|
|
<dd><p>
|
|
Matching setup and cleanup operations are frequently united into a single entity called test fixture.
|
|
</p></dd>
|
|
<dt>
|
|
<a name="test-runner.def"></a><em class="firstterm">The test runner</em>
|
|
</dt>
|
|
<dd>
|
|
<p>
|
|
This is an "executive manager" that runs the show. The test runner's functionality should include
|
|
the following interfaces and operations:
|
|
</p>
|
|
<div class="itemizedlist"><ul type="disc">
|
|
<li class="listitem">
|
|
Entry point to a test module. This is usually either the function main() itself or single function that can be
|
|
invoked from it to start testing.
|
|
</li>
|
|
<li class="listitem">
|
|
Initialize the <acronym class="acronym">UTF</acronym> 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 class="first-line-indented">
|
|
An advanced test runner may provide additional features, including interactive <acronym class="acronym">GUI</acronym> interfaces,
|
|
test coverage and profiling support.
|
|
</p>
|
|
</dd>
|
|
<dt>
|
|
<a name="test-log.def"></a><em class="firstterm">The test log</em>
|
|
</dt>
|
|
<dd><p>
|
|
This is the record of all events that occur during the testing.
|
|
</p></dd>
|
|
<dt>
|
|
<a name="test-results-report.def"></a><em class="firstterm">The test results report</em>
|
|
</dt>
|
|
<dd><p>
|
|
This is the report produced by the <acronym class="acronym">UTF</acronym> after the testing is completed, that indicates which test cases/test
|
|
suites passed and which failed.
|
|
</p></dd>
|
|
</dl>
|
|
</div>
|
|
</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-2012 Gennadiy Rozental</div></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="usage-variants/extern-test-runner.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../user-guide.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="../usage-recommendations.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
</body>
|
|
</html>
|