Large scale automated testing requires running multiple independent test sessions in parallel. This is accomplished by running a number of Common Test nodes on one or more hosts, testing different target systems. Configuring, starting and controlling the test nodes independently can be a cumbersome operation. To aid this kind of automated large scale testing, CT offers a master test node component, CT Master, that handles central configuration and control in a system of distributed CT nodes.
The CT Master server runs on one dedicated Erlang node and uses distributed Erlang to communicate with any number of CT test nodes, each hosting a regular CT server. Test specifications are used as input to specify what to test on which test nodes, using what configuration.
The CT Master server writes progress information to HTML log files similarly to the regular CT server. The logs contain test statistics and links to the log files written by each independent CT server.
The CT master API is exported by the
CT Master requires all test nodes to be on the same network and share a common file system. As of this date, CT Master can not start test nodes automatically. The nodes must have been started in advance for CT Master to be able to start test sessions on them.
Tests are started by calling:
means first the tests specified by "ts1" will run, then the tests specified by "ts2" and finally the tests specified by both "ts3" and "ts4".
The
If CT Master fails initially to connect to any of the test nodes specified in a
test specification or in the
When tests start, CT Master prints information to console about the nodes that are involved. CT Master also reports when tests finish, successfully or unsuccessfully. If connection is lost to a node, the test on that node is considered finished. CT Master will not attempt to reestablish contact with the failing node. At any time to get the current status of the test nodes, call the function:
To stop one or more tests, use:
For detailed information about the
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
All test specification terms can have a
where
A
If
Consider the example in the
{node, node1, ct_node@host_x}. {node, node2, ct_node@host_y}. {logdir, master, "/home/test/master_logs"}. {logdir, "/home/test/logs"}. {config, node1, "/home/test/t1/cfg/config.cfg"}. {config, node2, "/home/test/t2/cfg/config.cfg"}. {config, "/home/test/t3/cfg/config.cfg"}. {alias, t1, "/home/test/t1"}. {alias, t2, "/home/test/t2"}. {alias, t3, "/home/test/t3"}. {suites, node1, t1, all}. {skip_suites, node1, t1, [t1B_SUITE,t1D_SUITE], "Not implemented"}. {skip_cases, node1, t1, t1A_SUITE, [test3,test4], "Irrelevant"}. {skip_cases, node1, t1, t1C_SUITE, [test1], "Ignore"}. {suites, node2, t2, [t2B_SUITE,t2C_SUITE]}. {cases, node2, t2, t2A_SUITE, [test4,test1,test7]}. {skip_suites, t3, all, "Not implemented"}.
This example specifies the same tests as the original example. But
now if started with a call to
If the test session is instead started with a call to
A nice feature is that a test specification that includes node
information can still be used as input to the regular Common Test server
(as described in the
It is recommended that absolute paths are used for log directories, config files and test directory aliases in the test specifications so that current working directory settings are not important.