diff options
author | Peter Andersson <[email protected]> | 2015-05-04 16:04:24 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2015-05-04 16:04:24 +0200 |
commit | 1fc847019eadb0190997dfe4fc4f9d97a688b887 (patch) | |
tree | f87b9f3548137de99c0d210d4cfdc7f61e18a382 /lib/common_test/doc | |
parent | d766187ac01d8b5a73926f2a32bdac44e5933a7a (diff) | |
parent | 1378dee07e847c8af91aef1afc66ad0026a8cefb (diff) | |
download | otp-1fc847019eadb0190997dfe4fc4f9d97a688b887.tar.gz otp-1fc847019eadb0190997dfe4fc4f9d97a688b887.tar.bz2 otp-1fc847019eadb0190997dfe4fc4f9d97a688b887.zip |
Merge remote-tracking branch 'origin/peppe/common_test/test_categories'
* origin/peppe/common_test/test_categories:
Reintroduce functions for backwards compatibility
Update handling of failing all/0 function in test suites
Add tests for the get_testspec_terms functionality
Introduce test categories for OTP tests
OTP-11962
Diffstat (limited to 'lib/common_test/doc')
-rw-r--r-- | lib/common_test/doc/src/run_test_chapter.xml | 25 |
1 files changed, 25 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..df60e5f7f2 100644 --- a/lib/common_test/doc/src/run_test_chapter.xml +++ b/lib/common_test/doc/src/run_test_chapter.xml @@ -1005,6 +1005,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> |