From fc13629197e7c3698ff0739b51d8219069444dec Mon Sep 17 00:00:00 2001 From: Kenneth Lundin Date: Thu, 29 Aug 2013 11:56:20 +0200 Subject: Corrections so that the documentation confirms to the DTD --- lib/common_test/doc/src/write_test_chapter.xml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'lib/common_test/doc/src/write_test_chapter.xml') diff --git a/lib/common_test/doc/src/write_test_chapter.xml b/lib/common_test/doc/src/write_test_chapter.xml index cc8d913994..a33b22ac39 100644 --- a/lib/common_test/doc/src/write_test_chapter.xml +++ b/lib/common_test/doc/src/write_test_chapter.xml @@ -129,8 +129,8 @@

-
+ Init and end per test case

Each test suite module can contain the optional configuration functions @@ -173,7 +173,7 @@

The end_per_testcase/2 function is called even after a - test case terminates due to a call to ct:abort_current_testcase/1, + test case terminates due to a call to ct:abort_current_testcase/1, or after a timetrap timeout. However, end_per_testcase will then execute on a different process than the test case function, and in this situation, end_per_testcase will @@ -243,8 +243,8 @@

The test case function argument Config should not be confused with the information that can be retrieved from - configuration files (using - ct:get_config/1/2). The Config argument + configuration files (using + ct:get_config/1/2). The Config argument should be used for runtime configuration of the test suite and the test cases, while configuration files should typically contain data related to the SUT. These two types of configuration data are handled @@ -303,7 +303,7 @@

Use this to specify arbitrary data related to the testcase. This - data can be retrieved at any time using the ct:userdata/3 + data can be retrieved at any time using the ct:userdata/3 utility function.

@@ -348,8 +348,8 @@

See the Config files - chapter and the - ct:require/1/2 function in the + chapter and the + ct:require/1/2 function in the ct reference manual for more information about require.

@@ -826,14 +826,16 @@ Common Test to create one dedicated private directory per test case and execution instead. This is accomplished by means of the flag/option: create_priv_dir (to be used with the - ct_run program, the ct:run_test/1 function, or + ct_run program, the ct:run_test/1 function, or as test specification term). There are three possible values for this option: +

auto_per_run auto_per_tc manual_per_tc +

The first value indicates the default priv_dir behaviour, i.e. one private directory created per test run. The two latter values tell Common Test to generate a unique test directory name @@ -842,7 +844,7 @@ become very inefficient for test runs with many test cases and/or repetitions. Therefore, in case the manual version is instead used, the test case must tell Common Test to create priv_dir when it needs it. - It does this by calling the function ct:make_priv_dir/0. + It does this by calling the function ct:make_priv_dir/0.

You should not depend on current working directory for @@ -890,7 +892,7 @@

It is also possible to dynamically set/reset a timetrap during the excution of a test case, or configuration function. This is done by calling - ct:timetrap/1. This function cancels the current timetrap + ct:timetrap/1. This function cancels the current timetrap and starts a new one (that stays active until timeout, or end of the current function).

@@ -903,12 +905,12 @@

If a test case needs to suspend itself for a time that also gets multipled by multiply_timetraps (and possibly also scaled up if - scale_timetraps is enabled), the function ct:sleep/1 + scale_timetraps is enabled), the function ct:sleep/1 may be used (instead of e.g. timer:sleep/1).

A function (fun/0 or MFA) may be specified as timetrap value in the suite-, group- and test case info function, as - well as argument to the ct:timetrap/1 function. Examples:

+ well as argument to the ct:timetrap/1 function. Examples:

{timetrap,{my_test_utils,timetrap,[?MODULE,system_start]}}

ct:timetrap(fun() -> my_timetrap(TestCaseName, Config) end)

-- cgit v1.2.3