From 149298508f1ebbe34a7509be9dc9e2116ec0ca3f Mon Sep 17 00:00:00 2001
From: Peter Andersson
Date: Thu, 2 Sep 2010 18:35:09 +0200
Subject: Update the configuration data chapter in the user's guide
---
lib/common_test/doc/src/config_file_chapter.xml | 39 +++++++++++++------------
1 file changed, 21 insertions(+), 18 deletions(-)
diff --git a/lib/common_test/doc/src/config_file_chapter.xml b/lib/common_test/doc/src/config_file_chapter.xml
index 850bc74e19..77b0c0c0b7 100644
--- a/lib/common_test/doc/src/config_file_chapter.xml
+++ b/lib/common_test/doc/src/config_file_chapter.xml
@@ -21,7 +21,7 @@
- Config Files
+ External Configuration Data
Siri Hansen, Peter Andersson
@@ -32,16 +32,19 @@
General
- The Common Test framework uses configuration files to
- describe data related to a test and/or an SUT (System Under Test).
- The configuration data makes it possible to change properties without
- changing the test program itself. Configuration data can for example be:
+ To avoid hard coding data values related to the test and/or SUT (System
+ Under Test) in the test suites, the data may instead be specified by means
+ of configuration files or strings that Common Test reads before
+ the start of a test run. External configuration data makes it possible to
+ change test properties without having to modify the actual test suites
+ using the data. Examples of configuration data:
- Addresses to the test plant or other instruments
- - Filenames for files needed by the test
- - Program names for programs that shall be run by the test
- - Any other variable that is needed by the test
+ - User login information
+ - Names of files needed by the test
+ - Names of programs that should be executed during the test
+ - Any other variable needed by the test
@@ -51,12 +54,12 @@
A configuration file can contain any number of elements of the type:
- {Key,Value}.
+ {CfgVarName,Value}.
where
- Key = atom()
- Value = term() | [{Key,Value}]
+ CfgVarName = atom()
+ Value = term() | [{CfgVarName,Value}]
@@ -65,8 +68,8 @@
In a test suite, one must require that a configuration
- variable exists before attempting to read the associated
- value in a test case.
+ variable (CfgVarName in the definition above) exists before
+ attempting to read the associated value in a test case or config function.
require is an assert statement that can be part of the test suite info function or
@@ -83,13 +86,13 @@
A require statement in the test suite info- or test case
info-list should look like this:
- {require,Required} or {require,Name,Required}. The
- arguments Name and Required are the same as the
+ {require,CfgVarName} or {require,AliasName,CfgVarName}.
+ The arguments AliasName and CfgVarName are the same as the
arguments to ct:require/[1,2] which are described in the
reference manual for ct.
- Name becomes an alias for the configuration variable
- Required, and can be used as reference to the configuration
- data value. The configuration variable may be associated with an
+ AliasName becomes an alias for the configuration variable,
+ and can be used as reference to the configuration data value.
+ The configuration variable may be associated with an
arbitrary number of alias names, but each name must be unique within
the same test suite. There are two main uses for alias names:
--
cgit v1.2.3