diff options
Diffstat (limited to 'lib/common_test/doc/src/run_test_chapter.xml')
-rw-r--r-- | lib/common_test/doc/src/run_test_chapter.xml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/common_test/doc/src/run_test_chapter.xml b/lib/common_test/doc/src/run_test_chapter.xml index 864f82cb63..fc8d82c2c3 100644 --- a/lib/common_test/doc/src/run_test_chapter.xml +++ b/lib/common_test/doc/src/run_test_chapter.xml @@ -149,6 +149,7 @@ <p>Other flags that may be used with <c>ct_run</c>:</p> <list> + <item><c><![CDATA[-help]]></c>, lists all available start flags.</item> <item><c><![CDATA[-logdir <dir>]]></c>, specifies where the HTML log files are to be written.</item> <item><c><![CDATA[-label <name_of_test_run>]]></c>, associates the test run with a name that gets printed in the overview HTML log files.</item> @@ -223,6 +224,9 @@ behaviour using start flag:</p> <pre>-exit_status ignore_config</pre> + <note><p>Executing <c>ct_run</c> without start flags, is equal to the command: + <c>ct_run -dir ./</c></p></note> + <p>For more information about the <c>ct_run</c> program, see the <seealso marker="ct_run">Reference Manual</seealso> and the <seealso marker="install_chapter#general">Installation</seealso> chapter. @@ -251,6 +255,10 @@ <c>{error,Reason}</c>, where the term <c>Reason</c> explains the failure.</p> + <p>The default start option <c>{dir,Cwd}</c> (run all suites in the current + working directory) is used if the function is called with an empty + list of options.</p> + <section> <title>Releasing the Erlang shell</title> <p>During execution of tests, started with @@ -1005,6 +1013,31 @@ for starting the tests, the relaxed scanner mode is enabled by means of the tuple: <c>{allow_user_terms,true}</c></p> </section> + <section> + <title>Reading test specification terms</title> + <p>It's possible to look up terms in the current test specification + (i.e. the spec that's been used to configure and run the current test). + The function <c>get_testspec_terms()</c> returns a list of all test spec + terms (both config- and test terms) and <c>get_testspec_terms(Tags)</c> + returns the term (or a list of terms) matching the tag (or tags) in + <c>Tags</c>.</p> + <p>For example, in the test specification:</p> + <pre> + ... + {label, my_server_smoke_test}. + {config, "../../my_server_setup.cfg"}. + {config, "../../my_server_interface.cfg"}. + ...</pre> + <p>And in e.g. a test suite or a CT hook function:</p> + <pre> + ... + [{label,[{_Node,TestType}]}, {config,CfgFiles}] = + ct:get_testspec_terms([label,config]), + + [verify_my_server_cfg(TestType, CfgFile) || {Node,CfgFile} <- CfgFiles, + Node == node()]; + ...</pre> + </section> </section> <section> |