aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2011-12-11 20:42:59 +0100
committerPeter Andersson <[email protected]>2011-12-12 05:08:39 +0100
commitf27bd68aa4089c7c17add9cdb90591de932060a6 (patch)
tree707549339dfad140122ae6260cb3facb75f22680 /lib
parent5f93ed61f48b5d90d1217215d16a8ca61120dd66 (diff)
downloadotp-f27bd68aa4089c7c17add9cdb90591de932060a6.tar.gz
otp-f27bd68aa4089c7c17add9cdb90591de932060a6.tar.bz2
otp-f27bd68aa4089c7c17add9cdb90591de932060a6.zip
Document info functions for init/end_per_suite/group
Diffstat (limited to 'lib')
-rw-r--r--lib/common_test/doc/src/write_test_chapter.xml37
1 files changed, 31 insertions, 6 deletions
diff --git a/lib/common_test/doc/src/write_test_chapter.xml b/lib/common_test/doc/src/write_test_chapter.xml
index 9f2cf73ef2..c0ec26ddcc 100644
--- a/lib/common_test/doc/src/write_test_chapter.xml
+++ b/lib/common_test/doc/src/write_test_chapter.xml
@@ -369,10 +369,12 @@
<title>Test suite info function</title>
<p>The <c>suite/0</c> function can be used in a test suite
- module to set the default values for the <c>timetrap</c> and
- <c>require</c> tags. If a test case info function also specifies
- any of these tags, the default value is overruled. See above for
- more information.
+ module to e.g. set a default <c>timetrap</c> value and to
+ <c>require</c> external configuration data. If a test case-, or
+ group info function also specifies any of the info tags, it
+ overrides the default values set by <c>suite/0</c>. See the test
+ case info function above, and group info function below, for more
+ details.
</p>
<p>Other options that may be specified with the suite info list are:</p>
@@ -711,12 +713,35 @@
<p>The group info properties override those set with the
suite info function, and may in turn be overridden by test
- case info properties. Please see the suite- and test case info
- functions above for a list of valid info properties and more
+ case info properties. Please see the test case info
+ function above for a list of valid info properties and more
general information.</p>
</section>
<section>
+ <title>Info functions for init- and end-configuration</title>
+ <p>It is possible to use info functions also for the <c>init_per_suite</c>,
+ <c>end_per_suite</c>, <c>init_per_group</c>, and <c>end_per_group</c>
+ functions, and it works the same way as with info functions
+ for test cases (see above). This is useful e.g. for setting
+ timetraps and requiring external configuration data relevant
+ only for the configuration function in question (without
+ affecting properties set for groups and test cases in the suite).</p>
+
+ <p>The info function <c>init/end_per_suite()</c> is called for
+ <c>init/end_per_suite(Config)</c>, and info function
+ <c>init/end_per_group(GroupName)</c> is called for
+ <c>init/end_per_group(GroupName,Config)</c>. Info functions
+ can not be used with <c>init/end_per_testcase(TestCase, Config)</c>,
+ however, since these configuration functions execute on the test case process
+ and will use the same properties as the test case (i.e. the properties
+ set by the test case info function, <c>TestCase()</c>). Please see the test case
+ info function above for a list of valid info properties and more
+ general information.
+ </p>
+ </section>
+
+ <section>
<marker id="data_priv_dir"></marker>
<title>Data and Private Directories</title>