From 72d1fe572d3eb3748a86042a818d140f682ebc14 Mon Sep 17 00:00:00 2001
From: Peter Andersson
Date: Thu, 5 Jun 2014 16:44:34 +0200
Subject: Introduce test categories for OTP tests
---
lib/common_test/doc/src/run_test_chapter.xml | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
(limited to 'lib/common_test/doc')
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: {allow_user_terms,true}
+
+ Reading test specification terms
+ 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 get_testspec_terms() returns a list of all test spec
+ terms (both config- and test terms) and get_testspec_terms(Tags)
+ returns the term (or a list of terms) matching the tag (or tags) in
+ Tags.
+ For example, in the test specification:
+
+ ...
+ {label, my_server_smoke_test}.
+ {config, "../../my_server_setup.cfg"}.
+ {config, "../../my_server_interface.cfg"}.
+ ...
+ And in e.g. a test suite or a CT hook function:
+
+ ...
+ [{label,[{_Node,TestType}]}, {config,CfgFiles}] =
+ ct:get_testspec_terms([label,config]),
+
+ [verify_my_server_cfg(TestType, CfgFile) || {Node,CfgFile} <- CfgFiles,
+ Node == node()];
+ ...
+