User's Guide
Reference Manual
Release Notes
PDF
Top

Common Test
Reference Manual
Version 1.4.6

Expand All
Contract All

Table of Contents

- common_test
  - Top of manual page
  - Module:all/0
  - Module:groups/0
  - Module:suite/0
  - Module:init_per_suite/1
  - Module:end_per_suite/1
  - Module:init_per_group/2
  - Module:end_per_group/2
  - Module:init_per_testcase/2
  - Module:end_per_testcase/2
  - Module:testcase/0
  - Module:testcase/1
- run_test
- ct
  - Top of manual page
  - abort_current_testcase/1
  - comment/1
  - decrypt_config_file/2
  - decrypt_config_file/3
  - encrypt_config_file/2
  - encrypt_config_file/3
  - fail/1
  - get_config/1
  - get_config/2
  - get_config/3
  - get_status/0
  - get_target_name/1
  - install/1
  - listenv/1
  - log/1
  - log/2
  - log/3
  - pal/1
  - pal/2
  - pal/3
  - parse_table/1
  - print/1
  - print/2
  - print/3
  - require/1
  - require/2
  - run/1
  - run/2
  - run/3
  - run_test/1
  - run_testspec/1
  - start_interactive/0
  - step/3
  - step/4
  - stop_interactive/0
  - testcases/2
  - userdata/2
  - userdata/3
- ct_master
  - Top of manual page
  - abort/0
  - abort/1
  - progress/0
  - run/1
  - run/3
  - run/4
  - run_on_node/2
  - run_on_node/3
  - run_test/2
- ct_cover
  - Top of manual page
  - add_nodes/1
  - remove_nodes/1
- ct_ftp
  - Top of manual page
  - cd/2
  - close/1
  - delete/2
  - get/3
  - ls/2
  - open/1
  - put/3
  - recv/2
  - recv/3
  - send/2
  - send/3
  - type/2
- ct_ssh
  - Top of manual page
  - apread/4
  - apread/5
  - apwrite/4
  - apwrite/5
  - aread/3
  - aread/4
  - awrite/3
  - awrite/4
  - close/2
  - close/3
  - connect/1
  - connect/2
  - connect/3
  - del_dir/2
  - del_dir/3
  - delete/2
  - delete/3
  - disconnect/1
  - exec/2
  - exec/3
  - exec/4
  - get_file_info/2
  - get_file_info/3
  - list_dir/2
  - list_dir/3
  - make_dir/2
  - make_dir/3
  - make_symlink/3
  - make_symlink/4
  - open/3
  - open/4
  - opendir/2
  - opendir/3
  - position/3
  - position/4
  - pread/4
  - pread/5
  - pwrite/4
  - pwrite/5
  - read/3
  - read/4
  - read_file/2
  - read_file/3
  - read_file_info/2
  - read_file_info/3
  - read_link/2
  - read_link/3
  - read_link_info/2
  - read_link_info/3
  - receive_response/2
  - receive_response/3
  - receive_response/4
  - rename/3
  - rename/4
  - send/3
  - send/4
  - send/5
  - send_and_receive/3
  - send_and_receive/4
  - send_and_receive/5
  - send_and_receive/6
  - session_close/2
  - session_open/1
  - session_open/2
  - sftp_connect/1
  - subsystem/3
  - subsystem/4
  - write/3
  - write/4
  - write_file/3
  - write_file/4
  - write_file_info/3
  - write_file_info/4
- ct_rpc
  - Top of manual page
  - app_node/2
  - app_node/3
  - app_node/4
  - call/4
  - call/5
  - call/6
  - cast/4
  - cast/5
- ct_snmp
  - Top of manual page
  - get_next_values/3
  - get_values/3
  - load_mibs/1
  - register_agents/2
  - register_users/2
  - register_usm_users/2
  - set_info/1
  - set_values/4
  - start/2
  - start/3
  - stop/1
  - unregister_agents/1
  - unregister_users/1
  - update_usm_users/2
- ct_telnet
  - Top of manual page
  - close/1
  - cmd/2
  - cmd/3
  - cmdf/3
  - cmdf/4
  - cont_log/2
  - end_log/0
  - expect/2
  - expect/3
  - get_data/1
  - open/1
  - open/2
  - open/3
  - open/4
  - send/2
  - sendf/3
- unix_telnet

# ct_master

### MODULE

ct_master

### MODULE SUMMARY

Distributed test execution control for Common Test.

### DESCRIPTION

Distributed test execution control for Common Test.

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

### EXPORTS

abort() -> ok

Stops all running tests.

abort(Nodes) -> ok

Types:

Nodes = atom() | [atom()]

Stops tests on specified nodes.

progress() -> [{Node, Status}]

Types:

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 have not yet finished.

run(TestSpecs) -> ok

Types:

TestSpecs = string() | [SeparateOrMerged]

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

run(TestSpecs, InclNodes, ExclNodes) -> ok

Types:

TestSpecs = string() | [SeparateOrMerged]
SeparateOrMerged = string() | [string()]
InclNodes = [atom()]
ExclNodes = [atom()]

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

run(TestSpecs, AllowUserTerms, InclNodes, ExclNodes) -> ok

Types:

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 will be handled separately. It is however possible to also specify a list of specifications that should be merged into one before the tests are executed. Any test without a particular node specification will also be executed on the nodes in InclNodes. Nodes in the ExclNodes list will be excluded from the test.

run_on_node(TestSpecs, Node) -> ok

Types:

TestSpecs = string() | [SeparateOrMerged]
SeparateOrMerged = string() | [string()]
Node = atom()

Equivalent to run_on_node(TestSpecs, false, Node).

run_on_node(TestSpecs, AllowUserTerms, Node) -> ok

Types:

TestSpecs = string() | [SeparateOrMerged]
SeparateOrMerged = string() | [string()]
AllowUserTerms = bool()
Node = atom()

Tests are spawned on Node according to TestSpecs.

run_test(Node, Opts) -> ok

Types:

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}
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.