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/run_test_chapter.xml | 46 ++++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'lib/common_test/doc/src/run_test_chapter.xml') diff --git a/lib/common_test/doc/src/run_test_chapter.xml b/lib/common_test/doc/src/run_test_chapter.xml index afaed29626..657a72ef8c 100644 --- a/lib/common_test/doc/src/run_test_chapter.xml +++ b/lib/common_test/doc/src/run_test_chapter.xml @@ -105,8 +105,8 @@ RPC from a remote node.

-
+ Running tests from the OS command line

The ct_run program can be used for running tests from @@ -225,15 +225,15 @@

Common Test provides an Erlang API for running tests. The main (and most flexible) function for specifying and executing tests is called - ct:run_test/1. + ct:run_test/1. This function takes the same start parameters as - the ct_run + the ct_run program described above, only the flags are instead given as options in a list of key-value tuples. E.g. a test specified with ct_run like:

$ 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: @@ -245,7 +245,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, will remain the top level process of the Common Test system of processes. The result is that the Erlang shell is not available for interaction during @@ -260,19 +260,19 @@ 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.

Note that in order to use the - ct:break/1/2 and - ct:continue/0/1 functions, + ct:break/1/2 and + ct:continue/0/1 functions, release_shell must be set to true.

For detailed documentation about - ct:run_test/1, + ct:run_test/1, please see the - ct manual page.

+ ct manual page.

-
+ Test case group execution

With the ct_run flag, or ct:run_test/1 option group, @@ -442,9 +442,9 @@ for trying out various operations during test suite development.

To invoke the interactive shell mode, you can start an Erlang shell - manually and call ct:install/1 to install any configuration + manually and call ct:install/1 to install any configuration data you might need (use [] as argument otherwise), then - call ct:start_interactive/0 to start Common Test. If you use + call ct:start_interactive/0 to start Common Test. If you use the ct_run program, you may start the Erlang shell and Common Test in the same go by using the -shell and, optionally, the -config and/or -userconfig flag. Examples: @@ -463,8 +463,8 @@

If any functions using "required config data" (e.g. ct_telnet or ct_ftp functions) are to be called from the erlang shell, config - data must first be required with - ct:require/1/2. This is + data must first be required with + ct:require/1/2. This is equivalent to a require statement in the Test Suite Info Function or in the

If you wish to exit the interactive mode (e.g. to start an - automated test run with ct:run_test/1), call the function - ct:stop_interactive/0. This shuts down the + automated test run with ct:run_test/1), call the function + ct:stop_interactive/0. This shuts down the running ct application. Associations between configuration names and data created with require are - consequently deleted. ct:start_interactive/0 will get you + consequently deleted. ct:start_interactive/0 will get you back into interactive mode, but the previous state is not restored.

@@ -503,7 +503,7 @@ Step by step execution of test cases with the Erlang Debugger

By means of ct_run -step [opts], or by passing the - {step,Opts} option to ct:run_test/1, it is possible + {step,Opts} option to ct:run_test/1, it is possible to get the Erlang Debugger started automatically and use its graphical interface to investigate the state of the current test case and to execute it step by step and/or set execution breakpoints.

@@ -527,17 +527,17 @@ with dir.

-
+ Test Specifications
General description

The most flexible way to specify what to test, is to use a so called test specification. A test specification 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 may 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.

With configuration terms it is possible to e.g. label the test @@ -989,7 +989,7 @@ ct_run. This forces Common Test to ignore unrecognizable terms. Note that 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 means of the tuple: {allow_user_terms,true}

@@ -999,7 +999,7 @@ Running tests from the Web based GUI

The web based GUI, VTS, is started with the - ct_run + ct_run program. From the GUI you can load config files, and select directories, suites and cases to run. You can also state the config files, directories, suites and cases on the command line -- cgit v1.2.3