From 7b33aa92bb2558ba04a6436203638fd46592b8d2 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Thu, 27 May 2010 00:46:37 +0200 Subject: Improve documentation and fix minor problems General documentation and code updates. --- lib/common_test/doc/src/ct_master_chapter.xml | 52 ++++++++++++++------------- 1 file changed, 28 insertions(+), 24 deletions(-) (limited to 'lib/common_test/doc/src/ct_master_chapter.xml') diff --git a/lib/common_test/doc/src/ct_master_chapter.xml b/lib/common_test/doc/src/ct_master_chapter.xml index 14f318759e..bc51957aee 100644 --- a/lib/common_test/doc/src/ct_master_chapter.xml +++ b/lib/common_test/doc/src/ct_master_chapter.xml @@ -30,6 +30,7 @@
+ General

Large scale automated testing requires running multiple independent test sessions in parallel. This is accomplished by running @@ -105,6 +106,7 @@ manual page for this module.

+ Test Specifications

The test specifications used as input to CT Master are fully compatible with the specifications used as input to the regular CT server. The syntax is described in the @@ -195,11 +197,12 @@

- Automatic startup of the test target nodes + Automatic startup of test target nodes -

Is is possible to perform initial actions on test target nodes - automatically using a new term in the test specification, init.

+

Is is possible to automatically start, and perform initial actions, on + test target nodes by using the test specification term init.

Currently, two sub-terms are supported, node_start and eval.

+

Example:

      {node, node1, node1@host1}.
      {node, node2, node1@host2}.
@@ -207,38 +210,39 @@
      {node, node4, node1@host3}.
      {init, node1, [{node_start, [{callback_module, my_slave_callback}]}]}.
      {init, [node2, node3], {node_start, [{username, "ct_user"}, {password, "ct_password"}]}}.
-     {init, node4, {eval, {module, function, []}}}.
-    
+ {init, node4, {eval, {module, function, []}}}. +

This test specification declares that node1@host1 is to be started using - user's callback my_slave_callback with no parameters, and nodes node1@host2 and - node2@host2 will be started with the default callback module ct_slave, - using the given user name and password to log into remote host host2. - Also, there will be function module:function/0 evaluated on the - node1@host3, and result of this call will be printed to the log.

-

Default ct_slave callback module - delivered with the Common Test has the following features: + the user callback function callback_module:my_slave_callback/0, and nodes + node1@host2 and node2@host2 will be started with the default callback + module ct_slave. The given user name and password is used to log into remote + host host2. Also, the function module:function/0 will be evaluated on + node1@host3, and the result of this call will be printed to the log.

+ +

The default ct_slave callback module, + which is part of the Common Test application, has the following features: - Starting the Erlang nodes or local or remote hosts - (ssh is used for remote ones); + Starting Erlang target nodes on local or remote hosts + (ssh is used for communication). - Ability to start Erlang emulator with the additional flags - (any flags supported by erl are supported); + Ability to start an Erlang emulator with additional flags + (any flags supported by erl are supported). - Supervision of the node being start using internal callback - functions. Used to prevent hanging of started nodes. Configurable; + Supervision of a node being started by means of internal callback + functions. Used to prevent hanging nodes. (Configurable). - Monitoring of the master node by the slaves. Slave node may be - stopped in case of master node termination. Configurable; + Monitoring of the master node by the slaves. A slave node may be + stopped in case the master node terminates. (Configurable). - Execution of the user's functions after slave node is started. + Execution of user functions after a slave node is started. Functions can be given as a list of {Module, Function, Arguments} tuples.

-

Note that it is possible to specify eval term for the node as well +

Note that it is possible to specify an eval term for the node as well as startup_functions in the node_start options list. In this - case first node will be started, then the startup_functions are - executed, and finally functions specified with eval will be called. + case first the node will be started, then the startup_functions are + executed, and finally functions specified with eval are called.

-- cgit v1.2.3