From a95a238719369feb1002daeacf4e1485439a38d2 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 21 Aug 2012 17:44:49 +0200 Subject: Add more cross reference links to ct docs --- lib/common_test/doc/src/write_test_chapter.xml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 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 d545c9e432..1fae50577e 100644 --- a/lib/common_test/doc/src/write_test_chapter.xml +++ b/lib/common_test/doc/src/write_test_chapter.xml @@ -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,7 +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 @@ -302,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.

@@ -347,7 +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.

@@ -824,7 +826,7 @@ 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: @@ -840,7 +842,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 @@ -888,7 +890,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).

@@ -901,12 +903,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