3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Runtime parameters</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="test_output/summary.html" title="Summary of the API for controlling the output">
10 <link rel="next" href="runtime_config/test_unit_filtering.html" title="Test unit filtering">
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>
22 <div class="spirit-nav">
23 <a accesskey="p" href="test_output/summary.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="runtime_config/test_unit_filtering.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
27 <a name="boost_test.runtime_config"></a><a class="link" href="runtime_config.html" title="Runtime parameters">Runtime parameters</a>
28 </h2></div></div></div>
29 <div class="toc"><dl class="toc">
30 <dt><span class="section"><a href="runtime_config/test_unit_filtering.html">Test unit
31 filtering</a></span></dt>
32 <dt><span class="section"><a href="runtime_config/custom_command_line_arguments.html">Custom
33 command line arguments</a></span></dt>
34 <dt><span class="section"><a href="runtime_config/summary.html">Summary of run-time
35 parameters</a></span></dt>
38 <a name="boost_test.runtime_config.h0"></a>
39 <span class="phrase"><a name="boost_test.runtime_config.boost_test_runtime_parameters"></a></span><a class="link" href="runtime_config.html#boost_test.runtime_config.boost_test_runtime_parameters">Boost.Test
40 runtime parameters</a>
43 The <span class="emphasis"><em>Unit Test Framework</em></span> supports multiple parameters that
44 affect test module execution. To set the parameter's value you can either use
45 a runtime configuration subsystem interface from within the test module initialization
46 function or you can specify the value at runtime during test module invocation.
49 The <span class="emphasis"><em>Unit Test Framework</em></span> provides two ways to set a parameter
50 at runtime: by specifying a command line argument and by setting an environment
51 variable. The command line argument always overrides the corresponding environment
55 During test module initialization the <span class="emphasis"><em>Unit Test Framework</em></span>
56 parses the command line and excludes all parameters that belong to it and their
57 values from the argument list. The rest of command line is forwarded to the
58 test module initialization function supplied by you. The command line argument
59 format expected by the <span class="emphasis"><em>Unit Test Framework</em></span> is:
61 <pre class="programlisting"> --<command_line_argument_name>=<argument_value>
64 The command line argument name is case sensitive. It is required to match exactly
65 the name in parameter specification. There should not be any spaces between
66 '=' and either command line argument name or argument value.
69 The corresponding environment variable name is also case sensitive and is required
70 to exactly match the name in the parameter specification.
73 All information about the currently supported parameters of the <span class="emphasis"><em>Unit
74 Test Framework</em></span> is summarized in the section <a class="link" href="runtime_config/summary.html" title="Summary of run-time parameters">boost_test.runtime_config.summary</a>.
77 <a name="boost_test.runtime_config.h1"></a>
78 <span class="phrase"><a name="boost_test.runtime_config.test_filtering"></a></span><a class="link" href="runtime_config.html#boost_test.runtime_config.test_filtering">Test
82 The <span class="emphasis"><em>Unit Test Framework</em></span> provides an extensive filtering
83 facility making it easy to run a specific test or a subset of tests. The <a class="link" href="runtime_config/test_unit_filtering.html" title="Test unit filtering">section on filtering</a>
84 gives all the details for the command line interface.
87 Additionally, <a class="link" href="tests_organization/test_tree/test_suite.html" title="Test suite">test-suites</a>
88 and <a class="link" href="tests_organization/tests_grouping.html" title="Grouping tests into logical units by labels">labels</a>
89 may be used in order to construct subset of tests in an efficient and easy
90 way, while decorators (eg. <a class="link" href="utf_reference/test_org_reference/decorator_enabled.html" title="enabled / disabled (decorator)"><code class="computeroutput"><span class="identifier">disabled</span></code></a>, <a class="link" href="utf_reference/test_org_reference/decorator_precondition.html" title="precondition (decorator)"><code class="computeroutput"><span class="identifier">precondition</span></code></a>) can be used to set the
91 default run status of a test case.
94 <a name="boost_test.runtime_config.h2"></a>
95 <span class="phrase"><a name="boost_test.runtime_config.custom_runtime_parameters"></a></span><a class="link" href="runtime_config.html#boost_test.runtime_config.custom_runtime_parameters">Custom
96 runtime parameters</a>
99 It is possible to extend further the command line interface by providing a
100 custom command line interpretation logic. There are several ways on how to
101 integrate this logic in the <span class="emphasis"><em>Unit Test Framework</em></span> and this
102 is explained in details in the section <a class="link" href="runtime_config/custom_command_line_arguments.html" title="Custom command line arguments">Custom
103 runtime parameters</a>.
106 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
107 <td align="left"></td>
108 <td align="right"><div class="copyright-footer">Copyright © 2001-2019 Boost.Test
110 Distributed under the Boost Software License, Version 1.0. (See accompanying
111 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>)
116 <div class="spirit-nav">
117 <a accesskey="p" href="test_output/summary.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="runtime_config/test_unit_filtering.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>