20102016 Ericsson AB. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ct_master A ct_master.xml
ct_master Distributed test execution control for Common Test.

Distributed test execution control for Common Test.

This module exports functions for running Common Test nodes on multiple hosts in parallel.

abort() -> ok Stops all running tests.

Stops all running tests.

abort(Nodes) -> ok Stops tests on specified nodes. Nodes = atom() | [atom()]

Stops tests on specified nodes.

basic_html(Bool) -> ok If set to true, the ct_master logs are written on a primitive HTML format, not using the Common Test CSS style sheet. Bool = true | false

If set to true, the ct_master logs are written on a primitive HTML format, not using the Common Test CSS style sheet.

get_event_mgr_ref() -> MasterEvMgrRef Gets a reference to the Common Test master event manager. MasterEvMgrRef = atom()

Gets a reference to the Common Test master event manager. The reference can be used to, for example, add a user-specific event handler while tests are running.

Example:

 gen_event:add_handler(ct_master:get_event_mgr_ref(), my_ev_h, [])
progress() -> [{Node, Status}] Returns test progress. Node = atom() Status = finished_ok | ongoing | aborted | {error, Reason} Reason = term()

Returns test progress. If Status is ongoing, tests are running on the node and are not yet finished.

run(TestSpecs) -> ok Equivalent to run(TestSpecs, false, [], []). TestSpecs = string() | [SeparateOrMerged]

Equivalent to ct_master:run(TestSpecs, false, [], []).

run(TestSpecs, InclNodes, ExclNodes) -> ok Equivalent to run(TestSpecs, false, InclNodes, ExclNodes). TestSpecs = string() | [SeparateOrMerged] SeparateOrMerged = string() | [string()] InclNodes = [atom()] ExclNodes = [atom()]

Equivalent to ct_master:run(TestSpecs, false, InclNodes, ExclNodes).

run(TestSpecs, AllowUserTerms, InclNodes, ExclNodes) -> ok Tests are spawned on the nodes as specified in TestSpecs. TestSpecs = string() | [SeparateOrMerged] SeparateOrMerged = string() | [string()] AllowUserTerms = bool() InclNodes = [atom()] ExclNodes = [atom()]

Tests are spawned on the nodes as specified in TestSpecs. Each specification in TestSpec is handled separately. However, it is also possible to specify a list of specifications to be merged into one specification before the tests are executed. Any test without a particular node specification is also executed on the nodes in InclNodes. Nodes in the ExclNodes list are excluded from the test.

run_on_node(TestSpecs, Node) -> ok Equivalent to run_on_node(TestSpecs, false, Node). TestSpecs = string() | [SeparateOrMerged] SeparateOrMerged = string() | [string()] Node = atom()

Equivalent to ct_master:run_on_node(TestSpecs, false, Node).

run_on_node(TestSpecs, AllowUserTerms, Node) -> ok Tests are spawned on Node according to TestSpecs. TestSpecs = string() | [SeparateOrMerged] SeparateOrMerged = string() | [string()] AllowUserTerms = bool() Node = atom()

Tests are spawned on Node according to TestSpecs.

run_test(Node, Opts) -> ok Tests are spawned on Node using ct:run_test/1. Node = atom() Opts = [OptTuples] OptTuples = {config, CfgFiles} | {dir, TestDirs} | {suite, Suites} | {testcase, Cases} | {spec, TestSpecs} | {allow_user_terms, Bool} | {logdir, LogDir} | {event_handler, EventHandlers} | {silent_connections, Conns} | {cover, CoverSpecFile} | {cover_stop, Bool} | {userconfig, UserCfgFiles} CfgFiles = string() | [string()] TestDirs = string() | [string()] Suites = atom() | [atom()] Cases = atom() | [atom()] TestSpecs = string() | [string()] LogDir = string() EventHandlers = EH | [EH] EH = atom() | {atom(), InitArgs} | {[atom()], InitArgs} InitArgs = [term()] Conns = all | [atom()]

Tests are spawned on Node using ct:run_test/1