From 95e286750901d56e6e25fb13da8fe34f32702594 Mon Sep 17 00:00:00 2001
From: Lukas Larsson
Date: Mon, 9 Mar 2020 17:11:17 +0100
Subject: otp: Change all MFA links to use "/" syntax for arity
---
lib/common_test/doc/src/common_test_app.xml | 66 ++++++------
lib/common_test/doc/src/config_file_chapter.xml | 14 +--
lib/common_test/doc/src/cover_chapter.xml | 6 +-
lib/common_test/doc/src/ct.xml | 120 ++++++++++-----------
lib/common_test/doc/src/ct_cover.xml | 2 +-
lib/common_test/doc/src/ct_ftp.xml | 12 +--
lib/common_test/doc/src/ct_hooks.xml | 112 +++++++++----------
lib/common_test/doc/src/ct_hooks_chapter.xml | 72 ++++++-------
lib/common_test/doc/src/ct_master.xml | 8 +-
lib/common_test/doc/src/ct_master_chapter.xml | 10 +-
lib/common_test/doc/src/ct_netconfc.xml | 66 ++++++------
lib/common_test/doc/src/ct_rpc.xml | 4 +-
lib/common_test/doc/src/ct_run_cmd.xml | 2 +-
lib/common_test/doc/src/ct_slave.xml | 6 +-
lib/common_test/doc/src/ct_snmp.xml | 12 +--
lib/common_test/doc/src/ct_ssh.xml | 30 +++---
lib/common_test/doc/src/ct_telnet.xml | 30 +++---
lib/common_test/doc/src/dependencies_chapter.xml | 10 +-
lib/common_test/doc/src/event_handler_chapter.xml | 16 +--
.../doc/src/getting_started_chapter.xml | 2 +-
lib/common_test/doc/src/run_test_chapter.xml | 40 +++----
lib/common_test/doc/src/test_structure_chapter.xml | 4 +-
lib/common_test/doc/src/write_test_chapter.xml | 56 +++++-----
23 files changed, 350 insertions(+), 350 deletions(-)
(limited to 'lib/common_test/doc/src')
diff --git a/lib/common_test/doc/src/common_test_app.xml b/lib/common_test/doc/src/common_test_app.xml
index eb42a4e5f5..143984ad6a 100644
--- a/lib/common_test/doc/src/common_test_app.xml
+++ b/lib/common_test/doc/src/common_test_app.xml
@@ -96,12 +96,12 @@
indicating that the test case shall be repeated. A test case group is
represented by a group tuple, where GroupName,
an atom, is the name of the group (defined in
- groups/0).
+ groups/0).
Execution properties for groups can also be specified, both
for a top-level group and for any of its subgroups.
Group execution properties specified here override
properties in the group definition (see
- groups/0).
+ groups/0).
(With value default, the group definition properties
are used).
@@ -180,9 +180,9 @@
Tag timetrap sets the maximum time that each
test case is allowed to execute (including
- init_per_testcase/2
+ init_per_testcase/2
and
- end_per_testcase/2).
+ end_per_testcase/2).
If the timetrap time is exceeded, the test case fails with reason
timetrap_timeout. A TimeFunc function can be used to
set a new timetrap by returning a TimeVal. It can also be
@@ -196,12 +196,12 @@
in the suite. If the required configuration variables are not found
in any of the configuration files, all test cases are skipped.
For details about the require functionality, see funtion
- ct:require/1,2.
+ ct:require/1,2.
With userdata, the user can
specify any test suite-related information, which can be
read by calling
- ct:userdata/2.
+ ct:userdata/2.
Tag ct_hooks specifies the
Common Test Hooks
@@ -228,7 +228,7 @@
OPTIONAL; if this function is defined, then end_per_suite/1
+ marker="#Module:end_per_suite/1">end_per_suite/1
must also be defined.
This configuration function is called as the first function in the
@@ -262,12 +262,12 @@
OPTIONAL; if this function is defined, then init_per_suite/1
+ marker="#Module:init_per_suite/1">init_per_suite/1
must also be defined.
This function is called as the last test case in the
suite. It is meant to be used for cleaning up after
- init_per_suite/1.
+ init_per_suite/1.
For information on save_config, see section
Saving
Configuration Data in the User's Guide.
@@ -311,15 +311,15 @@
return a list of tagged tuples that specify various properties
related to the execution of a test case group (that is, its test
cases and subgroups). Properties set by
- group/1 override
+ group/1 override
properties with the same key that have been set previously by
- suite/0.
+ suite/0.
Tag timetrap sets the maximum time that each
test case is allowed to execute (including
- init_per_testcase/2
+ init_per_testcase/2
and
- end_per_testcase/2).
+ end_per_testcase/2).
If the timetrap time is
exceeded, the test case fails with reason
timetrap_timeout. A TimeFunc function can be used to
@@ -335,12 +335,12 @@
in any of the configuration files, all test cases in this group are
skipped. For details about the require functionality, see
function
- ct:require/1,2.
+ ct:require/1,2.
With userdata, the user can
specify any test case group related information that can be
read by calling
- ct:userdata/2.
+ ct:userdata/2.
Tag ct_hooks specifies the
Common Test Hooks
@@ -368,7 +368,7 @@
OPTIONAL; if this function is defined, then end_per_group/2
+ marker="#Module:end_per_group/2">end_per_group/2
must also be defined.
This configuration function is called before execution of a
@@ -376,7 +376,7 @@
common for all test cases and subgroups in the group, and that
must only be performed once. GroupName is the name of the
group, as specified in the group definition (see
- groups/0).
+ groups/0).
Parameter Config is the configuration data that can be
modified.
The return value of this function is given as Config
@@ -406,15 +406,15 @@
OPTIONAL; if this function is defined, then init_per_group/2
+ marker="#Module:init_per_group/2">init_per_group/2
must also be defined.
This function is called after the execution of a test case group
is finished. It is meant to be used for cleaning up after
- init_per_group/2.
+ init_per_group/2.
A status value for a nested subgroup can be returned with
{return_group_result,Status}. The status can be retrieved in
- end_per_group/2
+ end_per_group/2
for the group on the level above. The status is also used by
Common Test for deciding if execution of a group is to
proceed if property sequence or repeat_until_*
@@ -439,7 +439,7 @@
OPTIONAL; if this function is defined,
- then
+ then
end_per_testcase/2 must also be
defined.
@@ -469,13 +469,13 @@
OPTIONAL; if this function is defined,
- then
+ then
init_per_testcase/2 must also be
defined.
This function is called after each test case, and can be used
to clean up after
- init_per_testcase/2
+ init_per_testcase/2
and the test case. Any return value (besides {fail,Reason}
and {save_config,SaveConfig}) is ignored. By returning
{fail,Reason}, TestCase is marked as faulty (even
@@ -518,17 +518,17 @@
return a list of tagged tuples that specify various properties
related to the execution of this particular test case.
Properties set by
- Testcase/0
+ Testcase/0
override properties set previously for the test case by
- group/1 or
- suite/0.
+ group/1 or
+ suite/0.
Tag timetrap sets the maximum time that the
test case is allowed to execute. If the timetrap time is
exceeded, the test case fails with reason timetrap_timeout.
- init_per_testcase/2
+ init_per_testcase/2
and
- end_per_testcase/2
+ end_per_testcase/2
are included in the timetrap time.
A TimeFunc function can be used to
set a new timetrap by returning a TimeVal. It can also be
@@ -543,16 +543,16 @@
If the required configuration variables are not found in any of the
configuration files, the test case is skipped. For details about
the require functionality, see function
- ct:require/1,2.
+ ct:require/1,2.
If timetrap or require is not set, the
default values specified by
- suite/0 (or
- group/1) are used.
+ suite/0 (or
+ group/1) are used.
With userdata, the user can specify any test case-related
information that can be read by calling
- ct:userdata/3.
+ ct:userdata/3.
Other tuples than the ones defined are ignored.
@@ -579,7 +579,7 @@
The implementation of a test case. Call the functions to test and
check the result. If something fails, ensure the
function causes a runtime error or call
- ct:fail/1,2
+ ct:fail/1,2
(which also causes the test case process to terminate).
Elements from the Config list can, for example, be read
diff --git a/lib/common_test/doc/src/config_file_chapter.xml b/lib/common_test/doc/src/config_file_chapter.xml
index db93744214..2f7a630092 100644
--- a/lib/common_test/doc/src/config_file_chapter.xml
+++ b/lib/common_test/doc/src/config_file_chapter.xml
@@ -81,7 +81,7 @@
test is skipped (unless a default value has been specified, see section
Test Case Information
Function for details). Also, function
- ct:require/1/2 can be called
+ ct:require/1/2 can be called
from a test case to check if a specific variable is available. The return
value from this function must be checked explicitly and appropriate
action be taken depending on the result (for example, to skip the test case
@@ -91,7 +91,7 @@
information-list is to look like
{require,CfgVarName} or {require,AliasName,CfgVarName}.
The arguments AliasName and CfgVarName are the same as the
- arguments to ct:require/1,2.
+ arguments to ct:require/1,2.
AliasName becomes an alias for the configuration variable,
and can be used as reference to the configuration data value.
The configuration variable can be associated with any
@@ -103,7 +103,7 @@
(or test case) and improve readability.
To read the value of a configuration variable, use function
- get_config/1,2,3.
+ get_config/1,2,3.
Example:
@@ -121,7 +121,7 @@
Using Configuration Variables Defined in Multiple Files
If a configuration variable is defined in multiple files and you
want to access all possible values, use function
- ct:get_config/3
+ ct:get_config/3
and specify all in the options list. The values are then
returned in a list and the order of the elements corresponds to the order
that the configuration files were specified at startup.
@@ -134,7 +134,7 @@
if they must be stored in open and shared directories.
To have Common Test encrypt a
specified file using function DES3 in application Crypto,
- call ct:encrypt_config_file/2,3
+ call ct:encrypt_config_file/2,3
The encrypted file can then be used as a regular configuration file
in combination with other encrypted files or normal text files. However, the
key for decrypting the configuration file must be provided when running the test.
@@ -142,7 +142,7 @@
decrypt_file, or a key file in a predefined location.
Common Test also provides decryption functions,
- ct:decrypt_config_file/2,3,
+ ct:decrypt_config_file/2,3,
for recreating the original text files.
@@ -457,7 +457,7 @@
Here, the handler also provides for dynamically reloading of
configuration variables. If
- ct:reload_config(localtime) is called from
+ ct:reload_config(localtime) is called from
the test case function, all variables loaded with config_driver:read_config/1
are updated with their latest values, and the new value for variable
localtime is returned.
diff --git a/lib/common_test/doc/src/cover_chapter.xml b/lib/common_test/doc/src/cover_chapter.xml
index 6d063e8b2f..06a03c0d84 100644
--- a/lib/common_test/doc/src/cover_chapter.xml
+++ b/lib/common_test/doc/src/cover_chapter.xml
@@ -91,7 +91,7 @@
$ ct_run -dir $TESTOBJS/db -cover $TESTOBJS/db/config/db.coverspec
You can also pass the cover specification file name in a
- call to ct:run_test/1,
+ call to ct:run_test/1,
by adding a {cover,CoverSpec} tuple to argument Opts.
You can also enable code coverage in your test specifications (see section
Test Specifications
@@ -116,7 +116,7 @@
The option can be set by using flag -cover_stop with
ct_run, by adding {cover_stop,true|false} to argument
Opts to
- ct:run_test/1,
+ ct:run_test/1,
or by adding a cover_stop term in the test specification (see section
Test Specifications
in section Running Tests and Analyzing Results).
@@ -257,7 +257,7 @@
Then m1 is cover compiled in test run s2,
but not shown in the coverage log. Instead, if
- ct_cover:cross_cover_analyse/2
+ ct_cover:cross_cover_analyse/2
is called after both s1 and s2 test runs are completed,
the accumulated result for m1 is available in the cross cover
log for test run s1.
diff --git a/lib/common_test/doc/src/ct.xml b/lib/common_test/doc/src/ct.xml
index 83c0ecb309..1ce033c408 100644
--- a/lib/common_test/doc/src/ct.xml
+++ b/lib/common_test/doc/src/ct.xml
@@ -57,9 +57,9 @@
data_dir - Data file directory
priv_dir - Scratch file directory
Whatever added by
- init_per_suite/1
+ init_per_suite/1
or
- init_per_testcase/2
+ init_per_testcase/2
in the test suite.
@@ -92,7 +92,7 @@
-
A name and association to configuration data introduced
through a require statement, or a call to
- ct:require/2,
+ ct:require/2,
for example,
ct:require(mynodename,{node,[telnet]}).
@@ -170,7 +170,7 @@
configuration string. The callback module is to be either loaded or
present in the code part. Loaded configuration variables can later
be removed using function
- ct:remove_config/2.
+ ct:remove_config/2.
@@ -190,11 +190,11 @@
The user can then interact with the Erlang node running the tests,
for example, for debugging purposes or for manually executing a
part of the test case. If a parallel group is executing,
- ct:break/2 is to be
+ ct:break/2 is to be
called instead.
A cancelled timetrap is not automatically reactivated after the
break, but must be started exlicitly with
- ct:timetrap/1.
+ ct:timetrap/1.
In order for the break/continue functionality to work, Common
Test must release the shell process controlling stdin.
This is done by setting start option release_shell
@@ -216,10 +216,10 @@
Works the same way as
- ct:break/1, only
+ ct:break/1, only
argument TestCase makes it possible to pause a test case
executing in a parallel group. Function
- ct:continue/1 is to
+ ct:continue/1 is to
be used to resume execution of TestCase.
For details, see
@@ -235,7 +235,7 @@
Equivalent to
- ct:capture_get([default]).
+ ct:capture_get([default]).
@@ -255,9 +255,9 @@
If ExclCategories = [], no filtering takes place.
See also
- ct:capture_start/0,
- ct:capture_stop/0,
- ct:log/3.
+ ct:capture_start/0,
+ ct:capture_stop/0,
+ ct:log/3.
@@ -270,8 +270,8 @@
during execution of the test case.
See also
- ct:capture_get/1,
- ct:capture_stop/0.
+ ct:capture_get/1,
+ ct:capture_stop/0.
@@ -284,8 +284,8 @@
capture_start/0).
See also
- ct:capture_get/1,
- ct:capture_start/0.
+ ct:capture_get/1,
+ ct:capture_start/0.
@@ -321,7 +321,7 @@
Arguments Format and Args are used in a call to
io_lib:format/2 to create the comment string. The behavior
of comment/2 is otherwise the same as function
- ct:comment/1.
+ ct:comment/1.
@@ -332,7 +332,7 @@
This function must be called to continue after a test case
(not executing in a parallel group) has called function
- ct:break/1.
+ ct:break/1.
@@ -345,7 +345,7 @@
This function must be called to continue after a test case has
- called ct:break/2.
+ called ct:break/2.
If the paused test case, TestCase, executes in a parallel
group, this function, rather than continue/0, must be used
to let the test case proceed.
@@ -363,7 +363,7 @@
Decrypts EncryptFileName, previously generated with
- ct:encrypt_config_file/2,3.
+ ct:encrypt_config_file/2,3.
The original file contents is saved in the target file. The
encryption key, a string, must be available in a text file named
.ct_config.crypt, either in the current directory, or the
@@ -383,7 +383,7 @@
Decrypts EncryptFileName, previously generated with
- ct:encrypt_config_file/2,3.
+ ct:encrypt_config_file/2,3.
The original file contents is saved in the target file. The key
must have the same value as that used for encryption.
@@ -473,7 +473,7 @@
get_config(Required) -> Value
Equivalent to get_config(Required, undefined, []).
- Equivalent to ct:get_config(Required,
+ Equivalent to ct:get_config(Required,
undefined, []).
@@ -482,7 +482,7 @@
get_config(Required, Default) -> Value
Equivalent to get_config(Required, Default, []).
- Equivalent to ct:get_config(Required,
+ Equivalent to ct:get_config(Required,
Default, []).
@@ -505,7 +505,7 @@
Returns the matching values or configuration elements, given a
configuration variable key or its associated name (if one has been
specified with
- ct:require/2
+ ct:require/2
or a require statement).
Example:
@@ -528,7 +528,7 @@
ct:get_config(unknownkey,Default) -> Default
If a configuration variable key has been associated with a name (by
- ct:require/2
+ ct:require/2
or a require statement), the name can be used instead
of the key to read the value:
@@ -546,10 +546,10 @@
returned elements are then on the form {Required,Value}.
See also
- ct:get_config/1,
- ct:get_config/2,
- ct:require/1,
- ct:require/2.
+ ct:get_config/1,
+ ct:get_config/2,
+ ct:require/1,
+ ct:require/2.
@@ -744,7 +744,7 @@
Equivalent to log(default, 50, Format, [], []).
Equivalent to
- ct:log(default, 50, Format, [], []).
+ ct:log(default, 50, Format, [], []).
@@ -757,7 +757,7 @@
X2 = Format | FormatArgs
- Equivalent to ct:log(Category,
+ Equivalent to ct:log(Category,
Importance, Format, FormatArgs, []).
@@ -772,7 +772,7 @@
X3 = Format | FormatArgs | Opts
- Equivalent to ct:log(Category,
+ Equivalent to ct:log(Category,
Importance, Format, FormatArgs, Opts).
@@ -788,7 +788,7 @@
X4 = FormatArgs | Opts
- Equivalent to ct:log(Category,
+ Equivalent to ct:log(Category,
Importance, Format, FormatArgs, Opts).
@@ -863,7 +863,7 @@
Equivalent to pal(default, 50, Format, [], []).
Equivalent to
- ct:pal(default, 50, Format,
+ ct:pal(default, 50, Format,
[], []).
@@ -877,7 +877,7 @@
X2 = Format | FormatArgs
- Equivalent to ct:pal(Category,
+ Equivalent to ct:pal(Category,
Importance, Format, FormatArgs, []).
@@ -892,7 +892,7 @@
X3 = Format | FormatArgs | Opts
- Equivalent to ct:pal(Category,
+ Equivalent to ct:pal(Category,
Importance, Format, FormatArgs, Opts).
@@ -908,7 +908,7 @@
X4 = FormatArgs | Opts
- Equivalent to ct:pal(Category,
+ Equivalent to ct:pal(Category,
Importance, Format, FormatArgs, Opts).
@@ -970,7 +970,7 @@
print(Format) -> ok
Equivalent to print(default, 50, Format, [], []).
- Equivalent to ct:print(default,
+ Equivalent to ct:print(default,
50, Format, [], []).
@@ -984,7 +984,7 @@
X2 = Format | FormatArgs
- Equivalent to ct:print(Category,
+ Equivalent to ct:print(Category,
Importance, Format, FormatArgs, []).
@@ -999,7 +999,7 @@
X3 = Format | FormatArgs | Opts
- Equivalent to ct:print(Category,
+ Equivalent to ct:print(Category,
Importance, Format, FormatArgs, Opts).
@@ -1015,7 +1015,7 @@
X4 = FormatArgs | Opts
- Equivalent to ct:print(Category,
+ Equivalent to ct:print(Category,
Importance, Format, FormatArgs, Opts).
@@ -1170,10 +1170,10 @@
{myvar,[{sub1,[{sub2,Value}]}]}.
See also
- ct:get_config/1,
- ct:get_config/2,
- ct:get_config/3,
- ct:require/2.
+ ct:get_config/1,
+ ct:get_config/2,
+ ct:get_config/3,
+ ct:require/2.
@@ -1190,12 +1190,12 @@
Checks if the required configuration is available and gives it a
name. The semantics for Required is the same as in
- ct:require/1 except
+ ct:require/1 except
that a list of SubKeys cannot be specified.
If the requested data is available, the subentry is associated
with Name so that the value of the element can be read with
- ct:get_config/1,2
+ ct:get_config/1,2
provided Name is used instead of the whole Required
term.
@@ -1229,10 +1229,10 @@
See also
- ct:get_config/1,
- ct:get_config/2,
- ct:get_config/3,
- ct:require/1.
+ ct:get_config/1,
+ ct:get_config/2,
+ ct:get_config/3,
+ ct:require/1.
@@ -1246,7 +1246,7 @@
Runs all test cases in all suites in the specified directories.
- See also ct:run/3.
+ See also ct:run/3.
@@ -1256,7 +1256,7 @@
Runs all test cases in the specified suite.
- See also ct:run/3.
+ See also ct:run/3.
@@ -1273,7 +1273,7 @@
Runs the specified test cases.
Requires that
- ct:install/1 has been
+ ct:install/1 has been
run first.
Suites (*_SUITE.erl) files must be stored in TestDir
@@ -1348,7 +1348,7 @@
TestRunnerPid is returned if release_shell == true.
For details, see
- ct:break/1.
+ ct:break/1.
Reason indicates the type of error encountered.
@@ -1425,7 +1425,7 @@
If any functions (for example, Telnet or FTP) using
"required configuration data" are to be called from the Erlang shell,
configuration data must first be required with
- ct:require/2.
+ ct:require/2.
Example:
@@ -1448,7 +1448,7 @@
Steps through a test case with the debugger.
- See also ct:run/3.
+ See also ct:run/3.
@@ -1465,7 +1465,7 @@
config has been specifed, breakpoints are also set on
the configuration functions in Suite.
- See also ct:run/3.
+ See also ct:run/3.
@@ -1476,7 +1476,7 @@
Exits the interactive mode.
See also
- ct:start_interactive/0.
+ ct:start_interactive/0.
@@ -1551,7 +1551,7 @@
Returns any data specified with tag userdata in the list
of tuples returned from
- suite/0.
+ suite/0.
diff --git a/lib/common_test/doc/src/ct_cover.xml b/lib/common_test/doc/src/ct_cover.xml
index 70ea9b65ed..03a405abed 100644
--- a/lib/common_test/doc/src/ct_cover.xml
+++ b/lib/common_test/doc/src/ct_cover.xml
@@ -94,7 +94,7 @@
Call this function to stop cover test on nodes previously
added with
- ct_cover:add_nodes/1.
+ ct_cover:add_nodes/1.
Results on the remote node are transferred to the Common Test
node.
diff --git a/lib/common_test/doc/src/ct_ftp.xml b/lib/common_test/doc/src/ct_ftp.xml
index 7ee6049486..38b8e51407 100644
--- a/lib/common_test/doc/src/ct_ftp.xml
+++ b/lib/common_test/doc/src/ct_ftp.xml
@@ -111,13 +111,13 @@
RemoteFile and LocalFile must be absolute paths.
The configuration file must be as for
- ct_ftp:put/3.
+ ct_ftp:put/3.
For target_name, see module
ct.
See also
- ct:require/2.
+ ct:require/2.
@@ -156,7 +156,7 @@
with the handle value.
For information on how to create a new Name, see
- ct:require/2.
+ ct:require/2.
For target_name, see module
ct.
@@ -198,7 +198,7 @@
{password,Password}]}.
See also
- ct:require/2.
+ ct:require/2.
@@ -210,7 +210,7 @@
The file gets the same name on the local host.
- See also ct_ftp:recv/3.
+ See also ct_ftp:recv/3.
@@ -238,7 +238,7 @@
The file gets the same name on the remote host.
See also
- ct_ftp:send/3.
+ ct_ftp:send/3.
diff --git a/lib/common_test/doc/src/ct_hooks.xml b/lib/common_test/doc/src/ct_hooks.xml
index cd9323a5ff..c98caee06d 100644
--- a/lib/common_test/doc/src/ct_hooks.xml
+++ b/lib/common_test/doc/src/ct_hooks.xml
@@ -91,11 +91,11 @@
this CTH.
Id is either the return value of
- ct_hooks:id/1,
+ ct_hooks:id/1,
or a reference (created using
- erlang:make_ref/0
+ erlang:make_ref/0
in ERTS) if
- ct_hooks:id/1
+ ct_hooks:id/1
is not implemented.
Priority is the relative priority of this hook. Hooks with a
@@ -129,12 +129,12 @@
OPTIONAL
This function is called after
- groups/0.
+ groups/0.
It is used to modify the test group definitions, for
instance to add or remove groups or change group properties.
GroupDefs is what
- groups/0
+ groups/0
returned, that is, a list of group definitions.
NewGroupDefs is the possibly modified version of this list.
@@ -145,12 +145,12 @@
in the User's Guide.
Notice that for CTHs that are installed by means of the
- suite/0
+ suite/0
function, post_groups/2 is called before
- the init/2
+ the init/2
hook function. However, for CTHs that are installed by means
of the CT start flag,
- the init/2
+ the init/2
function is called first.
@@ -190,19 +190,19 @@
OPTIONAL
This function is called after
- all/0.
+ all/0.
It is used to modify the set of test cases and test group to
be executed, for instance to add or remove test cases and
groups, change group properties, or even skip all tests in
the suite.
Return is what
- all/0
+ all/0
returned, that is, a list of test cases and groups to be
executed, or a tuple {skip,Reason}.
GroupDefs is what
- groups/0
+ groups/0
or the post_groups/2 hook returned, that is, a list
of group definitions.
@@ -214,12 +214,12 @@
in the User's Guide.
Notice that for CTHs that are installed by means of the
- suite/0
+ suite/0
function, post_all/2 is called before
- the init/2
+ the init/2
hook function. However, for CTHs that are installed by means
of the CT start flag,
- the init/2
+ the init/2
function is called first.
@@ -252,7 +252,7 @@
OPTIONAL
This function is called before
- init_per_suite
+ init_per_suite
if it exists. It typically contains initialization/logging that must
be done before init_per_suite is called. If
{skip,Reason} or {fail,Reason} is returned,
@@ -269,11 +269,11 @@
Return is the result of the init_per_suite function.
If it is {skip,Reason} or {fail,Reason},
- init_per_suite
+ init_per_suite
is never called, instead the initiation is considered to be
skipped or failed, respectively. If a NewConfig list is
returned,
- init_per_suite
+ init_per_suite
is called with that NewConfig list. For more details, see
section Pre Hooks
in the User's Guide.
@@ -303,21 +303,21 @@
OPTIONAL
This function is called after
- init_per_suite
+ init_per_suite
if it exists. It typically contains extra checks to ensure that all
the correct dependencies are started correctly.
Return is what
- init_per_suite
+ init_per_suite
returned, that is, {fail,Reason}, {skip,Reason}, a
Config list, or a term describing how
- init_per_suite
+ init_per_suite
failed.
NewReturn is the possibly modified return value of
- init_per_suite.
+ init_per_suite.
To recover from a failure in
- init_per_suite,
+ init_per_suite,
return ConfigList with the tc_status element removed.
For more details, see
Post Hooks in
@@ -351,11 +351,11 @@
OPTIONAL
This function is called before
- init_per_group
+ init_per_group
if it exists. It behaves the same way as
- pre_init_per_suite,
+ pre_init_per_suite,
but for function
- init_per_group
+ init_per_group
instead.
If Module:pre_init_per_group/4 is not exported, common_test
@@ -384,11 +384,11 @@
OPTIONAL
This function is called after
- init_per_group
+ init_per_group
if it exists. It behaves the same way as
- post_init_per_suite,
+ post_init_per_suite,
but for function
- init_per_group
+ init_per_group
instead.
If Module:post_init_per_group/5 is not exported, common_test
@@ -417,11 +417,11 @@
OPTIONAL
This function is called before
- init_per_testcase
+ init_per_testcase
if it exists. It behaves the same way as
- pre_init_per_suite,
+ pre_init_per_suite,
but for function
- init_per_testcase
+ init_per_testcase
instead.
If Module:pre_init_per_testcase/4 is not exported, common_test
@@ -454,11 +454,11 @@
OPTIONAL
This function is called after
- init_per_testcase
+ init_per_testcase
if it exists. It behaves the same way as
- post_init_per_suite,
+ post_init_per_suite,
but for function
- init_per_testcase
+ init_per_testcase
instead.
If Module:post_init_per_testcase/5 is not exported, common_test
@@ -486,11 +486,11 @@
OPTIONAL
This function is called before
- end_per_testcase
+ end_per_testcase
if it exists. It behaves the same way as
- pre_end_per_suite,
+ pre_end_per_suite,
but for function
- end_per_testcase
+ end_per_testcase
instead.
This function cannot change the result of the test case by returning skip or fail
@@ -523,11 +523,11 @@
OPTIONAL
This function is called after
- end_per_testcase
+ end_per_testcase
if it exists. It behaves the same way as
- post_end_per_suite,
+ post_end_per_suite,
but for function
- end_per_testcase
+ end_per_testcase
instead.
If Module:post_end_per_testcase/5 is not exported, common_test
@@ -556,11 +556,11 @@
OPTIONAL
This function is called before
- end_per_group
+ end_per_group
if it exists. It behaves the same way as
- pre_init_per_suite,
+ pre_init_per_suite,
but for function
- end_per_group
+ end_per_group
instead.
If Module:pre_end_per_group/4 is not exported, common_test
@@ -589,11 +589,11 @@
OPTIONAL
This function is called after
- end_per_group
+ end_per_group
if it exists. It behaves the same way as
- post_init_per_suite,
+ post_init_per_suite,
but for function
- end_per_group
+ end_per_group
instead.
If Module:post_end_per_group/5 is not exported, common_test
@@ -621,11 +621,11 @@
OPTIONAL
This function is called before
- end_per_suite
+ end_per_suite
if it exists. It behaves the same way as
- pre_init_per_suite,
+ pre_init_per_suite,
but for function
- end_per_suite
+ end_per_suite
instead.
@@ -648,11 +648,11 @@
OPTIONAL
This function is called after
- end_per_suite
+ end_per_suite
if it exists. It behaves the same way as
- post_init_per_suite,
+ post_init_per_suite,
but for function
- end_per_suite
+ end_per_suite
instead.
@@ -677,9 +677,9 @@
If init_per_suite fails, this function is called after
- post_init_per_suite.
+ post_init_per_suite.
If a test case fails, this funcion is called after
- post_end_per_testcase.
+ post_end_per_testcase.
If the failed test case belongs to a test case group, the first
@@ -722,9 +722,9 @@
If init_per_group is skipped, this function is
called after
- post_init_per_group.
+ post_init_per_group.
If a test case is skipped, this function is called after
- post_end_per_testcase.
+ post_end_per_testcase.
If the skipped test case belongs to a test case group, the first
diff --git a/lib/common_test/doc/src/ct_hooks_chapter.xml b/lib/common_test/doc/src/ct_hooks_chapter.xml
index 8d1c546fb1..23cd81f4c9 100644
--- a/lib/common_test/doc/src/ct_hooks_chapter.xml
+++ b/lib/common_test/doc/src/ct_hooks_chapter.xml
@@ -79,15 +79,15 @@
Test Specification.
- Add tag ct_hooks to your call to
- ct:run_test/1.
+ ct:run_test/1.
CTHs can also be added within a test suite. This is done by returning
{ct_hooks,[CTH]} in the configuration list from
- suite/0,
-
+ suite/0,
+
init_per_suite/1, or
-
+
init_per_group/2.
In this case, CTH can either be only the module name of the CTH
@@ -105,7 +105,7 @@
to be activated. This can cause problems if you want to override
CTHs in test specifications while still having them in the
suite information function. The
- id/1
+ id/1
callback exists to address this problem. By returning the same
id in both places, Common Test knows that this CTH
is already installed and does not try to install it again.
@@ -118,7 +118,7 @@
This is not always desired, so Common Test allows
the user to specify a priority for each hook. The priority can either
be specified in the CTH function
- init/2 or when
+ init/2 or when
installing the hook. The priority specified at installation overrides the
priority returned by the CTH.
@@ -130,9 +130,9 @@
Once the CTH is installed into a certain test run it remains there until
its scope is expired. The scope of a CTH depends on when it is
installed, see the following table.
- Function init/2 is
+ Function init/2 is
called at the beginning of the scope and function
- terminate/1
+ terminate/1
is called when the scope ends.
@@ -146,7 +146,7 @@
the last test suite has been run |
- ct:run_test |
+ ct:run_test |
the first test suite is run |
the last test suite has been run |
@@ -157,27 +157,27 @@
the last test suite has been run |
- suite/0
+ suite/0
|
-
+
pre_init_per_suite/3 is called |
-
+
post_end_per_suite/4 has been called for that test suite |
| | |
-
+
init_per_suite/1 |
-
+
post_init_per_suite/4 is called |
-
+
post_end_per_suite/4 has been called for that test suite |
| | |
-
+
init_per_group/2 |
-
+
post_init_per_group/5 is called |
-
+
post_end_per_group/5 has been called for that group |
| | |
Scope of a CTH
@@ -197,12 +197,12 @@
External Configuration Data and Logging
Configuration data values in the CTH can be read
by calling
- ct:get_config/1,2,3
+ ct:get_config/1,2,3
(as explained in section
Requiring and Reading Configuration Data).
The configuration variables in question must, as always, first have been
required by a suite-, group-, or test case information function,
- or by function ct:require/1/2.
+ or by function ct:require/1/2.
The latter can also be used in CT hook functions.
The CT hook functions can call any logging function
in the ct interface to print information to the log files, or to
@@ -236,12 +236,12 @@
In a CTH, the behavior can be hooked in before the following functions:
- - init_per_suite
- - init_per_group
- - init_per_testcase
- - end_per_testcase
- - end_per_group
- - end_per_suite
+ - init_per_suite
+ - init_per_group
+ - init_per_testcase
+ - end_per_testcase
+ - end_per_group
+ - end_per_suite
@@ -282,12 +282,12 @@
Post Hooks
In a CTH, behavior can be hooked in after the following functions:
- - init_per_suite
- - init_per_group
- - init_per_testcase
- - end_per_testcase
- - end_per_group
- - end_per_suite
+ - init_per_suite
+ - init_per_group
+ - init_per_testcase
+ - end_per_testcase
+ - end_per_group
+ - end_per_suite
@@ -333,8 +333,8 @@
Skip and Fail Hooks
After any post hook has been executed for all installed CTHs,
- on_tc_fail
- or on_tc_skip
+ on_tc_fail
+ or on_tc_skip
is called if the testcase failed or was skipped, respectively.
You cannot affect the outcome of the tests any further at this point.
@@ -375,7 +375,7 @@
Example CTH
The following CTH logs information about a test run into a format
- parseable by file:consult/1
+ parseable by file:consult/1
(in Kernel):
@@ -511,7 +511,7 @@
handler called cth_log_redirect. The formatting and level is copied from
the current default handler when the cth is started. If you want to
use another level either change the default handler level before
- starting common_test, or use the
+ starting common_test, or use the
logger:set_handler_config/3 API.
cth_surefire
diff --git a/lib/common_test/doc/src/ct_master.xml b/lib/common_test/doc/src/ct_master.xml
index e1fa2958a3..cc69939146 100644
--- a/lib/common_test/doc/src/ct_master.xml
+++ b/lib/common_test/doc/src/ct_master.xml
@@ -118,7 +118,7 @@
TestSpecs = string() | [SeparateOrMerged]
- Equivalent to ct_master:run(TestSpecs,
+ Equivalent to ct_master:run(TestSpecs,
false, [], []).
@@ -134,7 +134,7 @@
ExclNodes = [atom()]
- Equivalent to ct_master:run(TestSpecs,
+ Equivalent to ct_master:run(TestSpecs,
false, InclNodes, ExclNodes).
@@ -171,7 +171,7 @@
Equivalent to
- ct_master:run_on_node(TestSpecs,
+ ct_master:run_on_node(TestSpecs,
false, Node).
@@ -210,7 +210,7 @@
Tests are spawned on Node using
- ct:run_test/1
+ ct:run_test/1
diff --git a/lib/common_test/doc/src/ct_master_chapter.xml b/lib/common_test/doc/src/ct_master_chapter.xml
index 7b5aae7ad8..f5f1a4c090 100644
--- a/lib/common_test/doc/src/ct_master_chapter.xml
+++ b/lib/common_test/doc/src/ct_master_chapter.xml
@@ -62,8 +62,8 @@
able to start test sessions on them.
Tests are started by calling
- ct_master:run(TestSpecs) or
- ct_master:run(TestSpecs, InclNodes, ExclNodes)
+ ct_master:run(TestSpecs) or
+ ct_master:run(TestSpecs, InclNodes, ExclNodes)
TestSpecs is either the name of a test specification file (string) or a list
of test specifications. If it is a list, the specifications are handled (and
@@ -101,11 +101,11 @@
does not attempt to re-establish contact with the failing node.
At any time, to get the current status of the test nodes, call function
- ct_master:progress().
+ ct_master:progress().
To stop one or more tests, use function
- ct_master:abort() (to stop all) or
- ct_master:abort(Nodes).
+ ct_master:abort() (to stop all) or
+ ct_master:abort(Nodes).
For details about the Common Test Master API, see module
ct_master.
diff --git a/lib/common_test/doc/src/ct_netconfc.xml b/lib/common_test/doc/src/ct_netconfc.xml
index f4d98b611b..a19f5c4663 100644
--- a/lib/common_test/doc/src/ct_netconfc.xml
+++ b/lib/common_test/doc/src/ct_netconfc.xml
@@ -45,21 +45,21 @@
Connecting to a NETCONF server
- Call connect/1,2
+
Call connect/1,2
to establish a connection to a server, then pass the returned
- handle to session/1-3 to
+ handle to session/1-3 to
establish a NETCONF session on a new SSH channel.
Each call to
- session/1-3 establishes a
+ session/1-3 establishes a
new session on the same connection, and results in a hello message
to the server.
Alternately,
- open/1,2 can be used to
+ open/1,2 can be used to
establish a single session on a dedicated connection.
(Or, equivalently,
- only_open/1,2
- followed by hello/1-3.)
+ only_open/1,2
+ followed by hello/1-3.)
Connect/session options can be specified in a configuration
file with entries like the following.
@@ -80,12 +80,12 @@
procedure calls (RPCs) from client to server and a corresponding
reply from server to client.
RPCs are sent using like-named functions (eg.
- edit_config/3-5
+ edit_config/3-5
to send an edit-config RPC), with the server reply
as return value.
There are functions for each RPC defined in RFC 6241 and
the create-subscription RPC from RFC 5277, all of which are
- wrappers on send_rpc/2,3,
+ wrappers on send_rpc/2,3,
that can be used to send an arbitrary RPC
not defined in RFC 6241 or RFC 5277.
@@ -137,7 +137,7 @@
To do this, use hook option hosts and list the names of the
servers/connections to be used in the suite. The connections
must be named for this to work, that is, they must be opened with
- open/2.
+ open/2.
Option hosts has no effect if log_type is set to
html or silent.
@@ -215,11 +215,11 @@
Handle to a connection to a NETCONF server as
returned by
- connect/1,2,
+ connect/1,2,
or to a session as returned by
- session/1-3,
- open/1,2,
- or only_open/1,2.
+ session/1-3,
+ open/1,2,
+ or only_open/1,2.
@@ -244,7 +244,7 @@
Event notification messages sent as a result of calls to
- create_subscription/2,3.
+ create_subscription/2,3.
@@ -253,7 +253,7 @@
Options host and port specify the
server endpoint to which to connect, and are passed directly
to ssh:connect/4,
+ marker="ssh:ssh#connect/3">ssh:connect/4
,
as are arbitrary ssh options. Common options are user,
password and user_dir.
@@ -299,7 +299,7 @@
Stream information as returned by
- get_event_streams/1-3.
+ get_event_streams/1-3.
See RFC 5277, "XML Schema for Event Notifications", for detail
on the format of the string values.
@@ -377,14 +377,14 @@
Opens an SSH connection to a NETCONF server.
If the server options are specified in a configuration file, use
- connect/2
+ connect/2
instead.
The opaque handle()
reference returned from this
function is required as connection identifier when opening
sessions over this connection, see
- session/1-3.
+ session/1-3.
@@ -404,17 +404,17 @@
the configuration file takes precedence.
If the server is not specified in a configuration file, use
- connect/1
+ connect/1
instead.
The opaque handle()
reference returned from this
function can be used as connection identifier when opening
sessions over this connection, see
- session/1-3.
+ session/1-3.
However, if KeyOrName is a
target_name(), that is, if the server is named through a
- call to ct:require/2
+ call to ct:require/2
or a require statement in the test suite, then this name can
be used instead of
handle().
@@ -513,7 +513,7 @@
If there are open NETCONF sessions on the connection, these
will be brutally aborted. To avoid this, close each session
- with close_session/1,2
+ with close_session/1,2
@@ -618,7 +618,7 @@
</netconf>
If more complex filtering is needed, use
- ct_netconfc:get/2,3 and
+ ct_netconfc:get/2,3 and
specify the exact filter according to "XML Schema for Event
Notifications" in RFC 5277.
@@ -645,7 +645,7 @@
specified timeout.
Note that capabilities for an outgoing hello can be passed
- directly to open/2.
+ directly to open/2.
@@ -685,7 +685,7 @@
Locks are intended to be short-lived.
Operation
- kill_session/2,3
+ kill_session/2,3
can be used to force the release of a lock owned by another NETCONF
session. How this is achieved by the server side is
implementation-specific.
@@ -698,7 +698,7 @@
Opens a NETCONF session, but does not send hello.
- As open/1, but
+
As open/1, but
does not send a hello message.
@@ -709,7 +709,7 @@
Opens a named NETCONF session, but does not send hello.
- As open/2, but
+
As open/2, but
does not send a hello message.
@@ -723,7 +723,7 @@
If the server options are specified in a configuration file,
or if a named client is needed for logging purposes (see section
Logging in this module), use
- open/2
+ open/2
instead.
The opaque handle()
@@ -751,7 +751,7 @@
the configuration file take precedence.
If the server is not specified in a configuration file, use
- open/1
+ open/1
instead.
The opaque handle()
@@ -759,13 +759,13 @@
function can be used as client identifier when calling any other
function in this module. However, if KeyOrName is a
target_name(), that is, if the server is named through a
- call to ct:require/2
+ call to ct:require/2
or a require statement in the test suite, then this name can
be used instead of
handle().
See also
- ct:require/2.
+ ct:require/2.
@@ -817,7 +817,7 @@
other function in this module. However, if KeyOrName
is used and it is a target_name(), that is, if the
server is named through a call
- to ct:require/2
+ to ct:require/2
or a require statement in the test suite, then this
name can be used instead of
handle().
@@ -833,7 +833,7 @@
Unlocks the configuration target.
If the client earlier has acquired a lock through
- lock/2,3, this
+ lock/2,3, this
operation releases the associated lock. To access another target
than running, the server must support :candidate
and/or :startup.
diff --git a/lib/common_test/doc/src/ct_rpc.xml b/lib/common_test/doc/src/ct_rpc.xml
index 69b735217c..e3247a7ad9 100644
--- a/lib/common_test/doc/src/ct_rpc.xml
+++ b/lib/common_test/doc/src/ct_rpc.xml
@@ -73,7 +73,7 @@
Same as
- ct_rpc:app_node/2,
+ ct_rpc:app_node/2,
except that argument FailOnBadRPC determines if the search
for a candidate node is to stop if badrpc is received at
some point.
@@ -94,7 +94,7 @@
Same as
- ct_rpc:app_node/2,
+ ct_rpc:app_node/2,
except that argument FailOnBadRPC determines if the search
for a candidate node is to stop if badrpc is received at
some point.
diff --git a/lib/common_test/doc/src/ct_run_cmd.xml b/lib/common_test/doc/src/ct_run_cmd.xml
index 3a9b8bbc03..a0097b148f 100644
--- a/lib/common_test/doc/src/ct_run_cmd.xml
+++ b/lib/common_test/doc/src/ct_run_cmd.xml
@@ -46,7 +46,7 @@
running Common Test in a particular mode.
The interface function
- ct:run_test/1,
+ ct:run_test/1,
corresponding to the ct_run program, is used for starting
Common Test from the Erlang shell (or an Erlang program).
For details, see the ct
diff --git a/lib/common_test/doc/src/ct_slave.xml b/lib/common_test/doc/src/ct_slave.xml
index d84d17d0b1..c0af685c71 100644
--- a/lib/common_test/doc/src/ct_slave.xml
+++ b/lib/common_test/doc/src/ct_slave.xml
@@ -63,7 +63,7 @@
Starts an Erlang node with name Node on the local host.
See also
- ct_slave:start/3.
+ ct_slave:start/3.
@@ -85,7 +85,7 @@
atom-valued and start(Node, Opts) when it is list-valued.
See also
- ct_slave:start/3.
+ ct_slave:start/3.
@@ -176,7 +176,7 @@
{error, started_not_connected, NodeName} if the
node is started, but not connected to the master node.
{error, not_alive, NodeName} if the node on which
- ct_slave:start/3 is
+ ct_slave:start/3 is
called, is not alive. Notice that NodeName is the name of
the current node in this case.
diff --git a/lib/common_test/doc/src/ct_snmp.xml b/lib/common_test/doc/src/ct_snmp.xml
index bedf8f3c8a..e057331e9d 100644
--- a/lib/common_test/doc/src/ct_snmp.xml
+++ b/lib/common_test/doc/src/ct_snmp.xml
@@ -170,7 +170,7 @@
A name for the data must be allocated in the suite using
require (see the example above). Pass this name as argument
SnmpAppConfName to
- ct_snmp:start/3.
+ ct_snmp:start/3.
ct_snmp specifies default values for some SNMP application
configuration parameters (such as {verbosity,trace} for parameter
config). This set of defaults is merged with the parameters
@@ -377,7 +377,7 @@
undefined).
Equivalent to
- ct_snmp:start(Config, MgrAgentConfName,
+ ct_snmp:start(Config, MgrAgentConfName,
undefined).
@@ -398,13 +398,13 @@
MgrAgentConfName, are performed. When using SNMPv3, called
USM users are also registered. Users, usm_users, and
managed agents can also be registered later using
- ct_snmp:register_users/2,
- ct_snmp:register_agents/2,
+ ct_snmp:register_users/2,
+ ct_snmp:register_agents/2,
and
- ct_snmp:register_usm_users/2.
+ ct_snmp:register_usm_users/2.
The agent started is called snmp_master_agent. Use
- ct_snmp:load_mibs/1
+ ct_snmp:load_mibs/1
to load MIBs into the agent.
With SnmpAppConfName SNMP applications can be configured
diff --git a/lib/common_test/doc/src/ct_ssh.xml b/lib/common_test/doc/src/ct_ssh.xml
index c4fb977354..88a48da2f8 100644
--- a/lib/common_test/doc/src/ct_ssh.xml
+++ b/lib/common_test/doc/src/ct_ssh.xml
@@ -239,7 +239,7 @@
Equivalent to connect(KeyOrName, host, []).
Equivalent to
- ct_ssh:connect(KeyOrName, host,
+ ct_ssh:connect(KeyOrName, host,
[]).
@@ -249,7 +249,7 @@
Equivalent to connect(KeyOrName, ConnType, []).
Equivalent to
- ct_ssh:connect(KeyOrName, ConnType,
+ ct_ssh:connect(KeyOrName, ConnType,
[]).
@@ -279,7 +279,7 @@
be opened using the configuration data specified by Key).
For information on how to create a new Name, see
- ct:require/2.
+ ct:require/2.
For target_name, see module
ct.
@@ -373,7 +373,7 @@
Equivalent to exec(SSH, Command, DefaultTimeout).
Equivalent to
- ct_ssh:exec(SSH, Command,
+ ct_ssh:exec(SSH, Command,
DefaultTimeout).
@@ -811,7 +811,7 @@
close).
Equivalent to
- ct_ssh:receive_response(SSH,
+ ct_ssh:receive_response(SSH,
ChannelId, close).
@@ -822,7 +822,7 @@ ChannelId, close).
DefaultTimeout).
Equivalent to
- ct_ssh:receive_response(SSH,
+ ct_ssh:receive_response(SSH,
ChannelId, End, DefaultTimeout).
@@ -895,7 +895,7 @@ ChannelId, End, DefaultTimeout).
Equivalent to send(SSH, ChannelId, 0, Data,
DefaultTimeout).
- Equivalent to ct_ssh:send(SSH,
+ Equivalent to ct_ssh:send(SSH,
ChannelId, 0, Data, DefaultTimeout).
@@ -904,7 +904,7 @@ ChannelId, End, DefaultTimeout).
send(SSH, ChannelId, Data, Timeout) -> ok | {error, Reason}
Equivalent to send(SSH, ChannelId, 0, Data, Timeout).
- Equivalent to ct_ssh:send(SSH,
+ Equivalent to ct_ssh:send(SSH,
ChannelId, 0, Data, Timeout).
@@ -931,7 +931,7 @@ ChannelId, End, DefaultTimeout).
close).
Equivalent to
- ct_ssh:send_and_receive(SSH,
+ ct_ssh:send_and_receive(SSH,
ChannelId, Data, close).
@@ -942,7 +942,7 @@ ChannelId, End, DefaultTimeout).
DefaultTimeout).
Equivalent to
- ct_ssh;send_and_receive(SSH,
+ ct_ssh;send_and_receive(SSH,
ChannelId, 0, Data, End, DefaultTimeout).
@@ -953,7 +953,7 @@ ChannelId, 0, Data, End, DefaultTimeout).
Timeout).
Equivalent to
- ct_ssh:send_and_receive(SSH,
+ ct_ssh:send_and_receive(SSH,
ChannelId, 0, Data, End, Timeout).
@@ -976,7 +976,7 @@ ChannelId, 0, Data, End, Timeout).
receive the server response.
For details on argument End, see
- ct_ssh:receive_response/4.
+ ct_ssh:receive_response/4.
@@ -998,7 +998,7 @@ ChannelId, 0, Data, End, Timeout).
Equivalent to session_open(SSH, DefaultTimeout).
Equivalent to
- ct_ssh:session_open(SSH,
+ ct_ssh:session_open(SSH,
DefaultTimeout).
@@ -1038,7 +1038,7 @@ ChannelId, 0, Data, End, Timeout).
Equivalent to shell(SSH, ChannelId, DefaultTimeout).
Equivalent to
- ct_ssh:shell(SSH, ChannelId,
+ ct_ssh:shell(SSH, ChannelId,
DefaultTimeout).
@@ -1066,7 +1066,7 @@ ChannelId, 0, Data, End, Timeout).
DefaultTimeout).
Equivalent to
- ct_ssh:subsystem(SSH, ChannelId,
+ ct_ssh:subsystem(SSH, ChannelId,
Subsystem, DefaultTimeout).
diff --git a/lib/common_test/doc/src/ct_telnet.xml b/lib/common_test/doc/src/ct_telnet.xml
index 2774ab3f3c..b928a1cba0 100644
--- a/lib/common_test/doc/src/ct_telnet.xml
+++ b/lib/common_test/doc/src/ct_telnet.xml
@@ -127,7 +127,7 @@
option hosts and list the names of the servers/connections
to be used in the suite. The connections must be named for this to
work (see
- ct_telnet:open/1,2,3,4).
+ ct_telnet:open/1,2,3,4).
Hook option log_type can be used to change the
cth_conn_log behavior. The default value of this option is
@@ -218,7 +218,7 @@
A connection can be associated with a target name and/or a handle.
If Connection has no associated target name, it can only
be closed with the handle value (see
- ct_telnet:open/4).
+ ct_telnet:open/4).
@@ -227,7 +227,7 @@
Equivalent to cmd(Connection, Cmd, []).
Equivalent to
- ct_telnet:cmd(Connection, Cmd,
+ ct_telnet:cmd(Connection, Cmd,
[]).
@@ -269,7 +269,7 @@
Equivalent to cmdf(Connection, CmdFormat, Args, []).
Equivalent to
- ct_telnet:cmdf(Connection, CmdFormat,
+ ct_telnet:cmdf(Connection, CmdFormat,
Args, []).
@@ -292,7 +292,7 @@
and a list of arguments to build the command).
For details, see
- ct_telnet:cmd/3.
+ ct_telnet:cmd/3.
@@ -301,7 +301,7 @@
Equivalent to expect(Connections, Patterns, []).
Equivalent to
- ct_telnet:expect(Connections,
+ ct_telnet:expect(Connections,
Patterns, []).
@@ -453,7 +453,7 @@
Equivalent to open(Name, telnet).
Equivalent to
- ct_telnet:open(Name,
+ ct_telnet:open(Name,
telnet).
@@ -478,7 +478,7 @@
Equivalent to open(KeyOrName, ConnType, TargetMod, []).
Equivalent to
- ct_telnet:ct_telnet:open(KeyOrName,
+ ct_telnet:ct_telnet:open(KeyOrName,
ConnType, TargetMod, []).
@@ -506,7 +506,7 @@
alternatives:
- ct:require/2
+ ct:require/2
in a test case
A require statement in the suite information
function (suite/0)
@@ -529,7 +529,7 @@
ct.
See also
- ct:require/2.
+ ct:require/2.
@@ -538,7 +538,7 @@
Equivalent to send(Connection, Cmd, []).
Equivalent to
- ct_telnet:send(Connection, Cmd,
+ ct_telnet:send(Connection, Cmd,
[]).
@@ -566,8 +566,8 @@
carriage return and newline characters.
The resulting output from the command can be read with
- ct_telnet:get_data/2 or
- ct_telnet:expect/2,3.
+ ct_telnet:get_data/2 or
+ ct_telnet:expect/2,3.
@@ -576,7 +576,7 @@
Equivalent to sendf(Connection, CmdFormat, Args, []).
Equivalent to
- ct_telnet:sendf(Connection, CmdFormat,
+ ct_telnet:sendf(Connection, CmdFormat,
Args, []).
@@ -598,7 +598,7 @@
string and a list of arguments to build the command).
For details, see
- ct_telnet:send/3.
+ ct_telnet:send/3.
diff --git a/lib/common_test/doc/src/dependencies_chapter.xml b/lib/common_test/doc/src/dependencies_chapter.xml
index 8ede822ae5..f5805cb6fe 100644
--- a/lib/common_test/doc/src/dependencies_chapter.xml
+++ b/lib/common_test/doc/src/dependencies_chapter.xml
@@ -87,8 +87,8 @@
To avoid this, we can consider starting and stopping the server for every test.
We can thus implement the start and stop action as common functions to be
called from
- init_per_testcase and
- end_per_testcase.
+ init_per_testcase and
+ end_per_testcase.
(Remember to test the start and stop functionality separately.)
The configuration can also be implemented as a common function, maybe grouped
with the start function. Finally, the testing of connecting and disconnecting a
@@ -194,9 +194,9 @@
To pass data from one test suite to another, the same mechanism is used. The data
is to be saved by finction
- end_per_suite
+ end_per_suite
and read by function
- init_per_suite
+ init_per_suite
in the suite that follows. When passing data between suites, Saver carries the
name of the test suite.
@@ -306,7 +306,7 @@
any property, that is, they are not required to also be sequences. If you want the
status of the subgroup to affect the sequence on the level above, return
{return_group_result,Status} from
- end_per_group/2,
+ end_per_group/2,
as described in section
Repeated Groups
in Writing Test Suites.
diff --git a/lib/common_test/doc/src/event_handler_chapter.xml b/lib/common_test/doc/src/event_handler_chapter.xml
index 89272891ed..26ad155bad 100644
--- a/lib/common_test/doc/src/event_handler_chapter.xml
+++ b/lib/common_test/doc/src/event_handler_chapter.xml
@@ -69,20 +69,20 @@
manager, either by telling Common Test to install them before the test
run (described later), or by adding the handlers dynamically during the test
run using
- gen_event:add_handler/3 or
- gen_event:add_sup_handler/3.
+ gen_event:add_handler/3 or
+ gen_event:add_sup_handler/3.
In the latter scenario, the reference of the Common Test event manager is
required. To get it, call
- ct:get_event_mgr_ref/0
+ ct:get_event_mgr_ref/0
or (on the Common Test Master node)
- ct_master:get_event_mgr_ref/0.
+ ct_master:get_event_mgr_ref/0.
Use
Event handlers can be installed by an event_handler start flag
(ct_run) or option
- ct:run_test/1, where the
+ ct:run_test/1, where the
argument specifies the names of one or more event handler modules.
Example:
@@ -99,7 +99,7 @@
example).
An event_handler tuple in argument Opts has the following definition
- (see ct:run_test/1):
+ (see ct:run_test/1):
{event_handler,EventHandlers}
@@ -377,8 +377,8 @@
manager can look like.
To ensure that printouts to stdout (or printouts made with
- ct:log/2,3 or
- ct:pal,2,3) get written to the test case log
+ ct:log/2,3 or
+ ct:pal,2,3) get written to the test case log
file, and not to the Common Test framework log, you can synchronize
with the Common Test server by matching on evvents tc_start and tc_done.
In the period between these events, all I/O is directed to the
diff --git a/lib/common_test/doc/src/getting_started_chapter.xml b/lib/common_test/doc/src/getting_started_chapter.xml
index 9b021058e8..7cd9a71cb7 100644
--- a/lib/common_test/doc/src/getting_started_chapter.xml
+++ b/lib/common_test/doc/src/getting_started_chapter.xml
@@ -85,7 +85,7 @@
a test case to generate a runtime error to indicate failure (for example,
by causing a bad match error or by calling exit/1, preferably
through the help function
- ct:fail/1,2). A successful
+ ct:fail/1,2). A successful
execution is indicated by a normal return from the test case function.
diff --git a/lib/common_test/doc/src/run_test_chapter.xml b/lib/common_test/doc/src/run_test_chapter.xml
index 700becf8ab..485568d286 100644
--- a/lib/common_test/doc/src/run_test_chapter.xml
+++ b/lib/common_test/doc/src/run_test_chapter.xml
@@ -64,7 +64,7 @@
control stdin), the test run proceeds automatically without the missing
suites. This behavior can however be modified with the
flag ,
- or the ct:run_test/1 option
+ or the ct:run_test/1 option
. If
is set to true, the test run
stops immediately if some suites fail to compile.
@@ -314,14 +314,14 @@
Common Test provides an Erlang API for running tests. The main
(and most flexible) function for specifying and executing tests is
- ct:run_test/1.
+ ct:run_test/1.
It takes the same start parameters as
ct_run,
but the flags are instead specified as options in a list of key-value tuples.
For example, a test specified with ct_run as follows:
$ ct_run -suite ./my_SUITE -logdir ./results
- is with ct:run_test/1 specified as:
+ is with ct:run_test/1 specified as:
1> ct:run_test([{suite,"./my_SUITE"},{logdir,"./results"}]).
The function returns the test result, represented by the tuple
@@ -337,7 +337,7 @@
Releasing the Erlang Shell
During execution of tests started with
- ct:run_test/1,
+ ct:run_test/1,
the Erlang shell process, controlling stdin, remains the top-level
process of the Common Test system of processes. Consequently,
the Erlang shell is not available for interaction during
@@ -352,13 +352,13 @@
ct:run_test/1 returns the pid of this process rather than the
test result, which instead is printed to tty at the end of the test run.
To use the functions
- ct:break/1,2 and
- ct:continue/0,1,
+ ct:break/1,2 and
+ ct:continue/0,1,
release_shell must be set to true.
For details, see
- ct:run_test/1 manual page.
+ ct:run_test/1 manual page.
@@ -542,9 +542,9 @@
trying out various operations during test suite development.
To start the interactive shell mode, start an Erlang shell
- manually and call ct:install/1
+ manually and call ct:install/1
to install any configuration data you might need (use [] as argument otherwise).
- Then call ct:start_interactive/0
+ Then call ct:start_interactive/0
to start Common Test.
If you use the ct_run program, you can start
@@ -564,7 +564,7 @@
If any functions using "required configuration data" (for example, functions
ct_telnet or ct_ftp) are to be called from the Erlang shell, first require
- configuration data with
+ configuration data with
ct:require/1,2. This is equivalent to a require statement
in the Test Suite Information Function
or in the Test Case Information Function.
@@ -587,13 +587,13 @@
is not supported.
If you wish to exit the interactive mode (for example, to start an automated
- test run with ct:run_test/1),
+ test run with ct:run_test/1),
call function
- ct:stop_interactive/0.
+ ct:stop_interactive/0.
This shuts down the running ct application. Associations between
configuration names and data created with require are
consequently deleted. Function
- ct:start_interactive/0
+ ct:start_interactive/0
takes you back into interactive mode, but the previous state is not restored.
@@ -601,7 +601,7 @@
Step-by-Step Execution of Test Cases with the Erlang Debugger
Using ct_run -step [opts], or by passing option {step,Opts}
- to ct:run_test/1,
+ to ct:run_test/1,
the following is possible:
- Get the Erlang Debugger started automatically.
@@ -635,9 +635,9 @@
The most flexible way to specify what to test, is to use a
test specification, which is a sequence of
Erlang terms. The terms are normally declared in one or more text files
- (see ct:run_test/1), but
+ (see ct:run_test/1), but
can also be passed to Common Test on the form of a list (see
- ct:run_testspec/1).
+ ct:run_testspec/1).
There are two general types of terms: configuration terms and test
specification terms.
@@ -1107,7 +1107,7 @@
when starting tests with ct_run. This forces Common Test to ignore
unrecognizable terms. In this mode, Common Test is not able to check the
specification for errors as efficiently as if the scanner runs in default mode.
- If ct:run_test/1 is used
+ If ct:run_test/1 is used
for starting the tests, the relaxed scanner mode is enabled by tuple
{allow_user_terms,true}.
@@ -1116,7 +1116,7 @@
Terms in the current test specification
(that is, the specification that has been used to configure and run the current test)
can be looked up.
- The function get_testspec_terms()
+ The function get_testspec_terms()
returns a list of all test specification terms (both configuration terms and test terms),
and get_testspec_terms(Tags) returns the term (or a list of terms) matching the
tag (or tags) in Tags.
@@ -1280,8 +1280,8 @@
The Unexpected I/O Log
The test suites overview page includes a link to the Unexpected I/O Log.
In this log, Common Test saves printouts made with
- ct:log/1,2,3,4,5 and
- ct:pal/1,2,3,4,5, as well as captured system
+ ct:log/1,2,3,4,5 and
+ ct:pal/1,2,3,4,5, as well as captured system
error- and progress reports, which cannot be associated with particular test cases and
therefore cannot be written to individual test case log files. This occurs,
for example, if a log printout is made from an external process (not a test
diff --git a/lib/common_test/doc/src/test_structure_chapter.xml b/lib/common_test/doc/src/test_structure_chapter.xml
index 3ffaa623c3..45ec67e3f6 100644
--- a/lib/common_test/doc/src/test_structure_chapter.xml
+++ b/lib/common_test/doc/src/test_structure_chapter.xml
@@ -60,8 +60,8 @@
- Returning {skip,Reason} from function
- init_per_testcase/2 or
- init_per_suite/1.
+ init_per_testcase/2 or
+ init_per_suite/1.
- Returning {skip,Reason} from the execution clause
of the test case. The execution clause is called, so the author
diff --git a/lib/common_test/doc/src/write_test_chapter.xml b/lib/common_test/doc/src/write_test_chapter.xml
index 8de2377fe6..a27c932050 100644
--- a/lib/common_test/doc/src/write_test_chapter.xml
+++ b/lib/common_test/doc/src/write_test_chapter.xml
@@ -67,7 +67,7 @@
Each test suite module must export function
- all/0,
+ all/0,
which returns the list of all test case groups and test cases
to be executed in that module.
@@ -83,8 +83,8 @@
Init and End per Suite
Each test suite module can contain the optional configuration functions
- init_per_suite/1
- and end_per_suite/1.
+ init_per_suite/1
+ and end_per_suite/1.
If the init function is defined, so must the end function be.
@@ -138,8 +138,8 @@
Init and End per Test Case
Each test suite module can contain the optional configuration functions
- init_per_testcase/2
- and end_per_testcase/2.
+ init_per_testcase/2
+ and end_per_testcase/2.
If the init function is defined, so must the end function be.
If init_per_testcase exists, it is called before each
@@ -187,7 +187,7 @@
Function end_per_testcase/2 is even called if a
test case terminates because of a call to
- ct:abort_current_testcase/1,
+ ct:abort_current_testcase/1,
or after a timetrap time-out. However, end_per_testcase
then executes on a different process than the test case
function. In this situation, end_per_testcase cannot
@@ -260,7 +260,7 @@
The test case function argument Config is not to be
confused with the information that can be retrieved from the
- configuration files (using
+ configuration files (using
ct:get_config/1/2). The test case argument Config
is to be used for runtime configuration of the test suite and the
test cases, while configuration files are to contain data
@@ -271,7 +271,7 @@
a data type called a property list, it can be handled by the
proplists module.
A value can, for example, be searched for and returned with function
- proplists:get_value/2.
+ proplists:get_value/2.
Also, or alternatively, the general lists
module contains useful functions. Normally, the only operations
performed on Config is insert (adding a tuple to the head of the list)
@@ -289,7 +289,7 @@
If the test case returns the tuple {comment,Comment}, the case
is considered successful and Comment is printed in the overview
log file. This is equal to calling
- ct:comment(Comment).
+ ct:comment(Comment).
@@ -322,7 +322,7 @@
Specifies any data related to the test case. This
data can be retrieved at any time using the
- ct:userdata/3
+ ct:userdata/3
utility function.
@@ -370,7 +370,7 @@
Requiring and Reading Configuration Data
in section External Configuration Data and function
- ct:require/1/2.
+ ct:require/1/2.
Specifying a default value for a required variable can result
in a test case always getting executed. This might not be a desired behavior.
@@ -378,7 +378,7 @@
If timetrap or require, or both, is not set specifically for
a particular test case, default values specified by function
- suite/0
+ suite/0
are used.
@@ -404,7 +404,7 @@
Test Suite Information Function
- Function suite/0
+
Function suite/0
can, for example, be used in a test suite module to set a default
timetrap value and to require external configuration data.
If a test case, or a group information function also specifies any of the information tags, it
@@ -445,7 +445,7 @@
A test case group is a set of test cases sharing configuration
functions and execution properties. Test case groups are defined by
function
- groups/0
+ groups/0
according to the following syntax:
groups() -> GroupDefs
@@ -561,12 +561,12 @@
execution is immediately stopped and the remaining cases are skipped.
Before execution of a group begins, the configuration function
- init_per_group(GroupName, Config)
+ init_per_group(GroupName, Config)
is called. The list of tuples returned from this function is passed to the
test cases in the usual manner by argument Config.
init_per_group/2 is meant to be used for initializations common
for the test cases in the group. After execution of the group is finished, function
- end_per_group(GroupName, Config)
+ end_per_group(GroupName, Config)
is called. This function is meant to be used for cleaning up after
init_per_group/2. If the init function is defined, so must the end function be.
@@ -834,7 +834,7 @@
test case and execution instead. This is accomplished with
the flag/option create_priv_dir (to be used with the
ct_run program, the
- ct:run_test/1 function, or
+ ct:run_test/1 function, or
as test specification term). There are three possible values
for this option as follows:
@@ -853,7 +853,7 @@
Therefore, if the manual version is used instead, 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.
+ ct:make_priv_dir/0.
Do not depend on the current working directory for
@@ -902,7 +902,7 @@
A timetrap can also be set or reset dynamically during the
execution of a test case, or configuration function.
This is done by calling
- ct:timetrap/1.
+ ct:timetrap/1.
This function cancels the current timetrap and starts a new one
(that stays active until time-out, or end of the current function).
@@ -916,13 +916,13 @@
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
+ ct:sleep/1
can be used (instead of, for example, timer:sleep/1).
A function (fun/0 or {Mod,Func,Args} (MFA) tuple) can be
specified as timetrap value in the suite-, group- and test case information
function, and as argument to function
- ct:timetrap/1.
+ ct:timetrap/1.
Examples:
{timetrap,{my_test_utils,timetrap,[?MODULE,system_start]}}
@@ -959,11 +959,11 @@
- ct:print(Category, Importance, Format, FormatArgs)
- ct:pal(Category, Importance, Format, FormatArgs)
- The log/1,2,3,4,5 function
+
The log/1,2,3,4,5 function
prints a string to the test case log file.
- The print/1,2,3,4 function
+ The print/1,2,3,4 function
prints the string to screen.
- The pal/1,2,3,4 function
+ The pal/1,2,3,4 function
prints the same string both to file and screen. The functions are described
in module ct.
@@ -1047,8 +1047,8 @@ ct:pal(?LOW_IMPORTANCE, "Info report: ~p", [Info])
ct:log(?INFO, "Info report: ~p", [Info])
ct:pal(?ERROR, "Error report: ~p", [Error])
- The functions ct:set_verbosity/2
- and ct:get_verbosity/1 may be used
+
The functions ct:set_verbosity/2
+ and ct:get_verbosity/1 may be used
to modify and read verbosity levels during test execution.
The arguments Format and FormatArgs in ct:log/print/pal are
@@ -1069,7 +1069,7 @@ ct:pal(?ERROR, "Error report: ~p", [Error])
to the log file made with ct:pal/4 and io:format/2. In order to print
strings with HTML tags to the log, use the ct:log/3,4,5 function. The character
escaping feature is per default disabled for ct:log/3,4,5 but can be enabled with
- the esc_chars option in the Opts list, see
+ the esc_chars option in the Opts list, see
ct:log/3,4,5.
If the character escaping feature needs to be disabled (typically for backwards
@@ -1163,7 +1163,7 @@ ct:pal(?ERROR, "Error report: ~p", [Error])
environment as possible, so that subsequent test cases
do not crash because of their execution order.
The function
- end_per_testcase
+ end_per_testcase
is suitable for this.
--
cgit v1.2.1