Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/more/test_policy.htm @ 56

Last change on this file since 56 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 5.1 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
7<meta name="ProgId" content="FrontPage.Editor.Document">
8<title>Boost Test Policies and Protocols</title>
9</head>
10
11<body bgcolor="#FFFFFF" text="#000000">
12
13<table border="1" bgcolor="#007F7F" cellpadding="2">
14  <tr>
15    <td bgcolor="#FFFFFF"><img src="../boost.png" alt="boost.png (6897 bytes)" width="277" height="86"></td>
16    <td><a href="../index.htm"><font face="Arial" color="#FFFFFF"><big>Home</big></font></a></td>
17    <td><a href="../libs/libraries.htm"><font face="Arial" color="#FFFFFF"><big>Libraries</big></font></a></td>
18    <td><a href="../people/people.htm"><font face="Arial" color="#FFFFFF"><big>People</big></font></a></td>
19    <td><a href="faq.htm"><font face="Arial" color="#FFFFFF"><big>FAQ</big></font></a></td>
20    <td><a href="index.htm"><font face="Arial" color="#FFFFFF"><big>More</big></font></a></td>
21  </tr>
22</table>
23<h1>Boost Test Policies and Protocols</h1>
24<p>The Boost libraries are intended to be both reliable and portable.&nbsp;
25Every experienced programmer knows that means each library must be tested against a suitable number of test cases, on a wide range of platforms,
26and then tested again (regression tested) every time a change is made and before
27every release.&nbsp;</p>
28<p>&quot;Quality assurance based on a wide range of targeted tests&quot; as one
29of the key answers to C.A.R
30Hoare's question
31&quot;How did software get so reliable without proof.&quot;</p>
32<h2>Regression test</h2>
33<p>Boost uses an automatic <a href="regression.html"> regression test suite</a> which generates HTML
34<a href="../status/compiler_status.html">compiler
35status tables</a>.</p>
36<h2>Test Policy</h2>
37<h3>Required</h3>
38<ul>
39  <li>Every Boost library should supply one or more suitable test programs to be
40    exercised by the Boost <a href="regression.html"> regression test suite</a>.&nbsp; In addition to
41    the usual compile-link-run tests expecting successful completion,
42    compile-only or compile-and-link-only tests may be performed, and success
43    for the test may be defined as failure of the steps.</li>
44  <li>Test program execution must report errors by returning a non-zero value.&nbsp; They
45    may also write to stdout or stderr, but that output should be relatively
46    brief.&nbsp; Regardless of other output, a non-zero return value is the only
47    way the regression test framework will recognize an error has
48    occurred.&nbsp;Note that test programs to be included in the status tables must
49    compile, link, and run quickly since the tests are executed many, many,
50    times.</li>
51  <li>Libraries with time consuming tests should be divided into a
52    fast-execution basic test program for the status tables, and a separate
53    full-coverage test program for exhaustive test cases.&nbsp; The basic test
54    should concentrate on compilation issues so that the status tables
55    accurately reflect the library's likelihood of correct compilation on a
56    platform.</li>
57  <li>If for any reason the usual test policies do not apply to a particular
58  library, an alternate test strategy must be implemented.</li>
59  <li>A <a href="regression.html#Adding_new_test">Jamfile</a> to drive the
60  regression tests for the library. &nbsp;&nbsp;</li>
61</ul>
62<h3>Optional (but highly recommended)</h3>
63<p>The <a href="../libs/test/index.html">Boost Test Library</a> provides many
64useful components which ease the construction of test programs.</p>
65<ul>
66  <li>Use the library's
67  <a href="../libs/test/doc/components/test_tools/index.html">Test Tools</a> for the construction of simple test
68  programs that do not need much structure.</li>
69  <li>Use the library's
70  <a href="../libs/test/doc/components/utf/index.html">Unit Test
71  Framework</a> for the construction of more complex test programs that need to
72  be structured into individual tests
73    and test suites.</li>
74</ul>
75<h2>Suggested Protocol for Fixing Bugs or Adding Features.</h2>
76<ul>
77  <li>First, add regression test cases that detects the bug or tests the
78    feature. Sometimes adding one case suggests similar untested cases, and they
79    are added too.</li>
80  <li>Second, for bugs, run the regression test and verify that the bug is now
81    detected.</li>
82  <li>Third, then, and only then, fix the bug or add the feature.</li>
83  <li>Finally, rerun the full regression tests - sometimes the change breaks
84    something else.</li>
85</ul>
86<h2>History</h2>
87<p><a href="regression.html#History">See Regression Test History</a>.</p>
88<h2>Acknowledgements</h2>
89<p>Written by Beman Dawes. Jens Maurer, Paul Moore, Gary Powell and Jeremy Siek contributed helpful suggestions.</p>
90<hr>
91<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->08 January, 2004<!--webbot bot="Timestamp" endspan i-checksum="38708" -->
92</p>
93<p>© Copyright Beman Dawes 2001</p>
94<p>Distributed under the Boost Software License, Version 1.0. (See
95accompanying file <a href="../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy
96at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p>
97
98</body>
99
100</html>
Note: See TracBrowser for help on using the repository browser.