Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 235

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- ct</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/common_test-1.6.3.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>Common Test</strong><br><strong>Reference Manual</strong><br><small>Version 1.6.3</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Table of Contents</strong></small></p>
<ul class="flipMenu">
<li id="no" title="common_test " expanded="false">common_test<ul>
<li><a href="common_test.html">
                  Top of manual page
                </a></li>
<li title="Module:all-0"><a href="common_test.html#Module:all-0">Module:all/0</a></li>
<li title="Module:groups-0"><a href="common_test.html#Module:groups-0">Module:groups/0</a></li>
<li title="Module:suite-0"><a href="common_test.html#Module:suite-0">Module:suite/0</a></li>
<li title="Module:init_per_suite-1"><a href="common_test.html#Module:init_per_suite-1">Module:init_per_suite/1</a></li>
<li title="Module:end_per_suite-1"><a href="common_test.html#Module:end_per_suite-1">Module:end_per_suite/1</a></li>
<li title="Module:group-1"><a href="common_test.html#Module:group-1">Module:group/1</a></li>
<li title="Module:init_per_group-2"><a href="common_test.html#Module:init_per_group-2">Module:init_per_group/2</a></li>
<li title="Module:end_per_group-2"><a href="common_test.html#Module:end_per_group-2">Module:end_per_group/2</a></li>
<li title="Module:init_per_testcase-2"><a href="common_test.html#Module:init_per_testcase-2">Module:init_per_testcase/2</a></li>
<li title="Module:end_per_testcase-2"><a href="common_test.html#Module:end_per_testcase-2">Module:end_per_testcase/2</a></li>
<li title="Module:Testcase-0"><a href="common_test.html#Module:Testcase-0">Module:Testcase/0</a></li>
<li title="Module:Testcase-1"><a href="common_test.html#Module:Testcase-1">Module:Testcase/1</a></li>
</ul>
</li>
<li title="ct_run"><a href="ct_run.html">ct_run</a></li>
<li id="loadscrollpos" title="ct " expanded="true">ct<ul>
<li><a href="ct.html">
                  Top of manual page
                </a></li>
<li title="abort_current_testcase-1"><a href="ct.html#abort_current_testcase-1">abort_current_testcase/1</a></li>
<li title="add_config-2"><a href="ct.html#add_config-2">add_config/2</a></li>
<li title="break-1"><a href="ct.html#break-1">break/1</a></li>
<li title="break-2"><a href="ct.html#break-2">break/2</a></li>
<li title="capture_get-0"><a href="ct.html#capture_get-0">capture_get/0</a></li>
<li title="capture_get-1"><a href="ct.html#capture_get-1">capture_get/1</a></li>
<li title="capture_start-0"><a href="ct.html#capture_start-0">capture_start/0</a></li>
<li title="capture_stop-0"><a href="ct.html#capture_stop-0">capture_stop/0</a></li>
<li title="comment-1"><a href="ct.html#comment-1">comment/1</a></li>
<li title="comment-2"><a href="ct.html#comment-2">comment/2</a></li>
<li title="continue-0"><a href="ct.html#continue-0">continue/0</a></li>
<li title="continue-1"><a href="ct.html#continue-1">continue/1</a></li>
<li title="decrypt_config_file-2"><a href="ct.html#decrypt_config_file-2">decrypt_config_file/2</a></li>
<li title="decrypt_config_file-3"><a href="ct.html#decrypt_config_file-3">decrypt_config_file/3</a></li>
<li title="encrypt_config_file-2"><a href="ct.html#encrypt_config_file-2">encrypt_config_file/2</a></li>
<li title="encrypt_config_file-3"><a href="ct.html#encrypt_config_file-3">encrypt_config_file/3</a></li>
<li title="fail-1"><a href="ct.html#fail-1">fail/1</a></li>
<li title="fail-2"><a href="ct.html#fail-2">fail/2</a></li>
<li title="get_config-1"><a href="ct.html#get_config-1">get_config/1</a></li>
<li title="get_config-2"><a href="ct.html#get_config-2">get_config/2</a></li>
<li title="get_config-3"><a href="ct.html#get_config-3">get_config/3</a></li>
<li title="get_status-0"><a href="ct.html#get_status-0">get_status/0</a></li>
<li title="get_target_name-1"><a href="ct.html#get_target_name-1">get_target_name/1</a></li>
<li title="get_timetrap_info-0"><a href="ct.html#get_timetrap_info-0">get_timetrap_info/0</a></li>
<li title="install-1"><a href="ct.html#install-1">install/1</a></li>
<li title="listenv-1"><a href="ct.html#listenv-1">listenv/1</a></li>
<li title="log-1"><a href="ct.html#log-1">log/1</a></li>
<li title="log-2"><a href="ct.html#log-2">log/2</a></li>
<li title="log-3"><a href="ct.html#log-3">log/3</a></li>
<li title="log-4"><a href="ct.html#log-4">log/4</a></li>
<li title="make_priv_dir-0"><a href="ct.html#make_priv_dir-0">make_priv_dir/0</a></li>
<li title="notify-2"><a href="ct.html#notify-2">notify/2</a></li>
<li title="pal-1"><a href="ct.html#pal-1">pal/1</a></li>
<li title="pal-2"><a href="ct.html#pal-2">pal/2</a></li>
<li title="pal-3"><a href="ct.html#pal-3">pal/3</a></li>
<li title="pal-4"><a href="ct.html#pal-4">pal/4</a></li>
<li title="parse_table-1"><a href="ct.html#parse_table-1">parse_table/1</a></li>
<li title="print-1"><a href="ct.html#print-1">print/1</a></li>
<li title="print-2"><a href="ct.html#print-2">print/2</a></li>
<li title="print-3"><a href="ct.html#print-3">print/3</a></li>
<li title="print-4"><a href="ct.html#print-4">print/4</a></li>
<li title="reload_config-1"><a href="ct.html#reload_config-1">reload_config/1</a></li>
<li title="remove_config-2"><a href="ct.html#remove_config-2">remove_config/2</a></li>
<li title="require-1"><a href="ct.html#require-1">require/1</a></li>
<li title="require-2"><a href="ct.html#require-2">require/2</a></li>
<li title="run-1"><a href="ct.html#run-1">run/1</a></li>
<li title="run-2"><a href="ct.html#run-2">run/2</a></li>
<li title="run-3"><a href="ct.html#run-3">run/3</a></li>
<li title="run_test-1"><a href="ct.html#run_test-1">run_test/1</a></li>
<li title="run_testspec-1"><a href="ct.html#run_testspec-1">run_testspec/1</a></li>
<li title="sleep-1"><a href="ct.html#sleep-1">sleep/1</a></li>
<li title="start_interactive-0"><a href="ct.html#start_interactive-0">start_interactive/0</a></li>
<li title="step-3"><a href="ct.html#step-3">step/3</a></li>
<li title="step-4"><a href="ct.html#step-4">step/4</a></li>
<li title="stop_interactive-0"><a href="ct.html#stop_interactive-0">stop_interactive/0</a></li>
<li title="sync_notify-2"><a href="ct.html#sync_notify-2">sync_notify/2</a></li>
<li title="testcases-2"><a href="ct.html#testcases-2">testcases/2</a></li>
<li title="timetrap-1"><a href="ct.html#timetrap-1">timetrap/1</a></li>
<li title="userdata-2"><a href="ct.html#userdata-2">userdata/2</a></li>
<li title="userdata-3"><a href="ct.html#userdata-3">userdata/3</a></li>
</ul>
</li>
<li id="no" title="ct_master " expanded="false">ct_master<ul>
<li><a href="ct_master.html">
                  Top of manual page
                </a></li>
<li title="abort-0"><a href="ct_master.html#abort-0">abort/0</a></li>
<li title="abort-1"><a href="ct_master.html#abort-1">abort/1</a></li>
<li title="basic_html-1"><a href="ct_master.html#basic_html-1">basic_html/1</a></li>
<li title="progress-0"><a href="ct_master.html#progress-0">progress/0</a></li>
<li title="run-1"><a href="ct_master.html#run-1">run/1</a></li>
<li title="run-3"><a href="ct_master.html#run-3">run/3</a></li>
<li title="run-4"><a href="ct_master.html#run-4">run/4</a></li>
<li title="run_on_node-2"><a href="ct_master.html#run_on_node-2">run_on_node/2</a></li>
<li title="run_on_node-3"><a href="ct_master.html#run_on_node-3">run_on_node/3</a></li>
<li title="run_test-2"><a href="ct_master.html#run_test-2">run_test/2</a></li>
</ul>
</li>
<li id="no" title="ct_cover " expanded="false">ct_cover<ul>
<li><a href="ct_cover.html">
                  Top of manual page
                </a></li>
<li title="add_nodes-1"><a href="ct_cover.html#add_nodes-1">add_nodes/1</a></li>
<li title="remove_nodes-1"><a href="ct_cover.html#remove_nodes-1">remove_nodes/1</a></li>
</ul>
</li>
<li id="no" title="ct_ftp " expanded="false">ct_ftp<ul>
<li><a href="ct_ftp.html">
                  Top of manual page
                </a></li>
<li title="cd-2"><a href="ct_ftp.html#cd-2">cd/2</a></li>
<li title="close-1"><a href="ct_ftp.html#close-1">close/1</a></li>
<li title="delete-2"><a href="ct_ftp.html#delete-2">delete/2</a></li>
<li title="get-3"><a href="ct_ftp.html#get-3">get/3</a></li>
<li title="ls-2"><a href="ct_ftp.html#ls-2">ls/2</a></li>
<li title="open-1"><a href="ct_ftp.html#open-1">open/1</a></li>
<li title="put-3"><a href="ct_ftp.html#put-3">put/3</a></li>
<li title="recv-2"><a href="ct_ftp.html#recv-2">recv/2</a></li>
<li title="recv-3"><a href="ct_ftp.html#recv-3">recv/3</a></li>
<li title="send-2"><a href="ct_ftp.html#send-2">send/2</a></li>
<li title="send-3"><a href="ct_ftp.html#send-3">send/3</a></li>
<li title="type-2"><a href="ct_ftp.html#type-2">type/2</a></li>
</ul>
</li>
<li id="no" title="ct_ssh " expanded="false">ct_ssh<ul>
<li><a href="ct_ssh.html">
                  Top of manual page
                </a></li>
<li title="apread-4"><a href="ct_ssh.html#apread-4">apread/4</a></li>
<li title="apread-5"><a href="ct_ssh.html#apread-5">apread/5</a></li>
<li title="apwrite-4"><a href="ct_ssh.html#apwrite-4">apwrite/4</a></li>
<li title="apwrite-5"><a href="ct_ssh.html#apwrite-5">apwrite/5</a></li>
<li title="aread-3"><a href="ct_ssh.html#aread-3">aread/3</a></li>
<li title="aread-4"><a href="ct_ssh.html#aread-4">aread/4</a></li>
<li title="awrite-3"><a href="ct_ssh.html#awrite-3">awrite/3</a></li>
<li title="awrite-4"><a href="ct_ssh.html#awrite-4">awrite/4</a></li>
<li title="close-2"><a href="ct_ssh.html#close-2">close/2</a></li>
<li title="close-3"><a href="ct_ssh.html#close-3">close/3</a></li>
<li title="connect-1"><a href="ct_ssh.html#connect-1">connect/1</a></li>
<li title="connect-2"><a href="ct_ssh.html#connect-2">connect/2</a></li>
<li title="connect-3"><a href="ct_ssh.html#connect-3">connect/3</a></li>
<li title="del_dir-2"><a href="ct_ssh.html#del_dir-2">del_dir/2</a></li>
<li title="del_dir-3"><a href="ct_ssh.html#del_dir-3">del_dir/3</a></li>
<li title="delete-2"><a href="ct_ssh.html#delete-2">delete/2</a></li>
<li title="delete-3"><a href="ct_ssh.html#delete-3">delete/3</a></li>
<li title="disconnect-1"><a href="ct_ssh.html#disconnect-1">disconnect/1</a></li>
<li title="exec-2"><a href="ct_ssh.html#exec-2">exec/2</a></li>
<li title="exec-3"><a href="ct_ssh.html#exec-3">exec/3</a></li>
<li title="exec-4"><a href="ct_ssh.html#exec-4">exec/4</a></li>
<li title="get_file_info-2"><a href="ct_ssh.html#get_file_info-2">get_file_info/2</a></li>
<li title="get_file_info-3"><a href="ct_ssh.html#get_file_info-3">get_file_info/3</a></li>
<li title="list_dir-2"><a href="ct_ssh.html#list_dir-2">list_dir/2</a></li>
<li title="list_dir-3"><a href="ct_ssh.html#list_dir-3">list_dir/3</a></li>
<li title="make_dir-2"><a href="ct_ssh.html#make_dir-2">make_dir/2</a></li>
<li title="make_dir-3"><a href="ct_ssh.html#make_dir-3">make_dir/3</a></li>
<li title="make_symlink-3"><a href="ct_ssh.html#make_symlink-3">make_symlink/3</a></li>
<li title="make_symlink-4"><a href="ct_ssh.html#make_symlink-4">make_symlink/4</a></li>
<li title="open-3"><a href="ct_ssh.html#open-3">open/3</a></li>
<li title="open-4"><a href="ct_ssh.html#open-4">open/4</a></li>
<li title="opendir-2"><a href="ct_ssh.html#opendir-2">opendir/2</a></li>
<li title="opendir-3"><a href="ct_ssh.html#opendir-3">opendir/3</a></li>
<li title="position-3"><a href="ct_ssh.html#position-3">position/3</a></li>
<li title="position-4"><a href="ct_ssh.html#position-4">position/4</a></li>
<li title="pread-4"><a href="ct_ssh.html#pread-4">pread/4</a></li>
<li title="pread-5"><a href="ct_ssh.html#pread-5">pread/5</a></li>
<li title="pwrite-4"><a href="ct_ssh.html#pwrite-4">pwrite/4</a></li>
<li title="pwrite-5"><a href="ct_ssh.html#pwrite-5">pwrite/5</a></li>
<li title="read-3"><a href="ct_ssh.html#read-3">read/3</a></li>
<li title="read-4"><a href="ct_ssh.html#read-4">read/4</a></li>
<li title="read_file-2"><a href="ct_ssh.html#read_file-2">read_file/2</a></li>
<li title="read_file-3"><a href="ct_ssh.html#read_file-3">read_file/3</a></li>
<li title="read_file_info-2"><a href="ct_ssh.html#read_file_info-2">read_file_info/2</a></li>
<li title="read_file_info-3"><a href="ct_ssh.html#read_file_info-3">read_file_info/3</a></li>
<li title="read_link-2"><a href="ct_ssh.html#read_link-2">read_link/2</a></li>
<li title="read_link-3"><a href="ct_ssh.html#read_link-3">read_link/3</a></li>
<li title="read_link_info-2"><a href="ct_ssh.html#read_link_info-2">read_link_info/2</a></li>
<li title="read_link_info-3"><a href="ct_ssh.html#read_link_info-3">read_link_info/3</a></li>
<li title="receive_response-2"><a href="ct_ssh.html#receive_response-2">receive_response/2</a></li>
<li title="receive_response-3"><a href="ct_ssh.html#receive_response-3">receive_response/3</a></li>
<li title="receive_response-4"><a href="ct_ssh.html#receive_response-4">receive_response/4</a></li>
<li title="rename-3"><a href="ct_ssh.html#rename-3">rename/3</a></li>
<li title="rename-4"><a href="ct_ssh.html#rename-4">rename/4</a></li>
<li title="send-3"><a href="ct_ssh.html#send-3">send/3</a></li>
<li title="send-4"><a href="ct_ssh.html#send-4">send/4</a></li>
<li title="send-5"><a href="ct_ssh.html#send-5">send/5</a></li>
<li title="send_and_receive-3"><a href="ct_ssh.html#send_and_receive-3">send_and_receive/3</a></li>
<li title="send_and_receive-4"><a href="ct_ssh.html#send_and_receive-4">send_and_receive/4</a></li>
<li title="send_and_receive-5"><a href="ct_ssh.html#send_and_receive-5">send_and_receive/5</a></li>
<li title="send_and_receive-6"><a href="ct_ssh.html#send_and_receive-6">send_and_receive/6</a></li>
<li title="session_close-2"><a href="ct_ssh.html#session_close-2">session_close/2</a></li>
<li title="session_open-1"><a href="ct_ssh.html#session_open-1">session_open/1</a></li>
<li title="session_open-2"><a href="ct_ssh.html#session_open-2">session_open/2</a></li>
<li title="sftp_connect-1"><a href="ct_ssh.html#sftp_connect-1">sftp_connect/1</a></li>
<li title="subsystem-3"><a href="ct_ssh.html#subsystem-3">subsystem/3</a></li>
<li title="subsystem-4"><a href="ct_ssh.html#subsystem-4">subsystem/4</a></li>
<li title="write-3"><a href="ct_ssh.html#write-3">write/3</a></li>
<li title="write-4"><a href="ct_ssh.html#write-4">write/4</a></li>
<li title="write_file-3"><a href="ct_ssh.html#write_file-3">write_file/3</a></li>
<li title="write_file-4"><a href="ct_ssh.html#write_file-4">write_file/4</a></li>
<li title="write_file_info-3"><a href="ct_ssh.html#write_file_info-3">write_file_info/3</a></li>
<li title="write_file_info-4"><a href="ct_ssh.html#write_file_info-4">write_file_info/4</a></li>
</ul>
</li>
<li id="no" title="ct_netconfc " expanded="false">ct_netconfc<ul>
<li><a href="ct_netconfc.html">
                  Top of manual page
                </a></li>
<li title="action-2"><a href="ct_netconfc.html#action-2">action/2</a></li>
<li title="action-3"><a href="ct_netconfc.html#action-3">action/3</a></li>
<li title="close_session-1"><a href="ct_netconfc.html#close_session-1">close_session/1</a></li>
<li title="close_session-2"><a href="ct_netconfc.html#close_session-2">close_session/2</a></li>
<li title="copy_config-3"><a href="ct_netconfc.html#copy_config-3">copy_config/3</a></li>
<li title="copy_config-4"><a href="ct_netconfc.html#copy_config-4">copy_config/4</a></li>
<li title="create_subscription-1"><a href="ct_netconfc.html#create_subscription-1">create_subscription/1</a></li>
<li title="create_subscription-2"><a href="ct_netconfc.html#create_subscription-2">create_subscription/2</a></li>
<li title="create_subscription-3"><a href="ct_netconfc.html#create_subscription-3">create_subscription/3</a></li>
<li title="create_subscription-4"><a href="ct_netconfc.html#create_subscription-4">create_subscription/4</a></li>
<li title="create_subscription-5"><a href="ct_netconfc.html#create_subscription-5">create_subscription/5</a></li>
<li title="create_subscription-6"><a href="ct_netconfc.html#create_subscription-6">create_subscription/6</a></li>
<li title="delete_config-2"><a href="ct_netconfc.html#delete_config-2">delete_config/2</a></li>
<li title="delete_config-3"><a href="ct_netconfc.html#delete_config-3">delete_config/3</a></li>
<li title="edit_config-3"><a href="ct_netconfc.html#edit_config-3">edit_config/3</a></li>
<li title="edit_config-4"><a href="ct_netconfc.html#edit_config-4">edit_config/4</a></li>
<li title="format_data-2"><a href="ct_netconfc.html#format_data-2">format_data/2</a></li>
<li title="get-2"><a href="ct_netconfc.html#get-2">get/2</a></li>
<li title="get-3"><a href="ct_netconfc.html#get-3">get/3</a></li>
<li title="get_capabilities-1"><a href="ct_netconfc.html#get_capabilities-1">get_capabilities/1</a></li>
<li title="get_capabilities-2"><a href="ct_netconfc.html#get_capabilities-2">get_capabilities/2</a></li>
<li title="get_config-3"><a href="ct_netconfc.html#get_config-3">get_config/3</a></li>
<li title="get_config-4"><a href="ct_netconfc.html#get_config-4">get_config/4</a></li>
<li title="get_event_streams-2"><a href="ct_netconfc.html#get_event_streams-2">get_event_streams/2</a></li>
<li title="get_event_streams-3"><a href="ct_netconfc.html#get_event_streams-3">get_event_streams/3</a></li>
<li title="get_session_id-1"><a href="ct_netconfc.html#get_session_id-1">get_session_id/1</a></li>
<li title="get_session_id-2"><a href="ct_netconfc.html#get_session_id-2">get_session_id/2</a></li>
<li title="handle_msg-2"><a href="ct_netconfc.html#handle_msg-2">handle_msg/2</a></li>
<li title="hello-1"><a href="ct_netconfc.html#hello-1">hello/1</a></li>
<li title="hello-2"><a href="ct_netconfc.html#hello-2">hello/2</a></li>
<li title="kill_session-2"><a href="ct_netconfc.html#kill_session-2">kill_session/2</a></li>
<li title="kill_session-3"><a href="ct_netconfc.html#kill_session-3">kill_session/3</a></li>
<li title="lock-2"><a href="ct_netconfc.html#lock-2">lock/2</a></li>
<li title="lock-3"><a href="ct_netconfc.html#lock-3">lock/3</a></li>
<li title="only_open-1"><a href="ct_netconfc.html#only_open-1">only_open/1</a></li>
<li title="only_open-2"><a href="ct_netconfc.html#only_open-2">only_open/2</a></li>
<li title="open-1"><a href="ct_netconfc.html#open-1">open/1</a></li>
<li title="open-2"><a href="ct_netconfc.html#open-2">open/2</a></li>
<li title="unlock-2"><a href="ct_netconfc.html#unlock-2">unlock/2</a></li>
<li title="unlock-3"><a href="ct_netconfc.html#unlock-3">unlock/3</a></li>
</ul>
</li>
<li id="no" title="ct_rpc " expanded="false">ct_rpc<ul>
<li><a href="ct_rpc.html">
                  Top of manual page
                </a></li>
<li title="app_node-2"><a href="ct_rpc.html#app_node-2">app_node/2</a></li>
<li title="app_node-3"><a href="ct_rpc.html#app_node-3">app_node/3</a></li>
<li title="app_node-4"><a href="ct_rpc.html#app_node-4">app_node/4</a></li>
<li title="call-4"><a href="ct_rpc.html#call-4">call/4</a></li>
<li title="call-5"><a href="ct_rpc.html#call-5">call/5</a></li>
<li title="call-6"><a href="ct_rpc.html#call-6">call/6</a></li>
<li title="cast-4"><a href="ct_rpc.html#cast-4">cast/4</a></li>
<li title="cast-5"><a href="ct_rpc.html#cast-5">cast/5</a></li>
</ul>
</li>
<li id="no" title="ct_snmp " expanded="false">ct_snmp<ul>
<li><a href="ct_snmp.html">
                  Top of manual page
                </a></li>
<li title="get_next_values-3"><a href="ct_snmp.html#get_next_values-3">get_next_values/3</a></li>
<li title="get_values-3"><a href="ct_snmp.html#get_values-3">get_values/3</a></li>
<li title="load_mibs-1"><a href="ct_snmp.html#load_mibs-1">load_mibs/1</a></li>
<li title="register_agents-2"><a href="ct_snmp.html#register_agents-2">register_agents/2</a></li>
<li title="register_users-2"><a href="ct_snmp.html#register_users-2">register_users/2</a></li>
<li title="register_usm_users-2"><a href="ct_snmp.html#register_usm_users-2">register_usm_users/2</a></li>
<li title="set_info-1"><a href="ct_snmp.html#set_info-1">set_info/1</a></li>
<li title="set_values-4"><a href="ct_snmp.html#set_values-4">set_values/4</a></li>
<li title="start-2"><a href="ct_snmp.html#start-2">start/2</a></li>
<li title="start-3"><a href="ct_snmp.html#start-3">start/3</a></li>
<li title="stop-1"><a href="ct_snmp.html#stop-1">stop/1</a></li>
<li title="unregister_agents-1"><a href="ct_snmp.html#unregister_agents-1">unregister_agents/1</a></li>
<li title="unregister_users-1"><a href="ct_snmp.html#unregister_users-1">unregister_users/1</a></li>
<li title="update_usm_users-2"><a href="ct_snmp.html#update_usm_users-2">update_usm_users/2</a></li>
</ul>
</li>
<li id="no" title="ct_telnet " expanded="false">ct_telnet<ul>
<li><a href="ct_telnet.html">
                  Top of manual page
                </a></li>
<li title="close-1"><a href="ct_telnet.html#close-1">close/1</a></li>
<li title="cmd-2"><a href="ct_telnet.html#cmd-2">cmd/2</a></li>
<li title="cmd-3"><a href="ct_telnet.html#cmd-3">cmd/3</a></li>
<li title="cmdf-3"><a href="ct_telnet.html#cmdf-3">cmdf/3</a></li>
<li title="cmdf-4"><a href="ct_telnet.html#cmdf-4">cmdf/4</a></li>
<li title="cont_log-2"><a href="ct_telnet.html#cont_log-2">cont_log/2</a></li>
<li title="end_log-0"><a href="ct_telnet.html#end_log-0">end_log/0</a></li>
<li title="expect-2"><a href="ct_telnet.html#expect-2">expect/2</a></li>
<li title="expect-3"><a href="ct_telnet.html#expect-3">expect/3</a></li>
<li title="get_data-1"><a href="ct_telnet.html#get_data-1">get_data/1</a></li>
<li title="open-1"><a href="ct_telnet.html#open-1">open/1</a></li>
<li title="open-2"><a href="ct_telnet.html#open-2">open/2</a></li>
<li title="open-3"><a href="ct_telnet.html#open-3">open/3</a></li>
<li title="open-4"><a href="ct_telnet.html#open-4">open/4</a></li>
<li title="send-2"><a href="ct_telnet.html#send-2">send/2</a></li>
<li title="sendf-3"><a href="ct_telnet.html#sendf-3">sendf/3</a></li>
</ul>
</li>
<li title="unix_telnet"><a href="unix_telnet.html">unix_telnet</a></li>
<li id="no" title="ct_slave " expanded="false">ct_slave<ul>
<li><a href="ct_slave.html">
                  Top of manual page
                </a></li>
<li title="start-1"><a href="ct_slave.html#start-1">start/1</a></li>
<li title="start-2"><a href="ct_slave.html#start-2">start/2</a></li>
<li title="start-3"><a href="ct_slave.html#start-3">start/3</a></li>
<li title="stop-1"><a href="ct_slave.html#stop-1">stop/1</a></li>
<li title="stop-2"><a href="ct_slave.html#stop-2">stop/2</a></li>
</ul>
</li>
<li id="no" title="ct_hooks " expanded="false">ct_hooks<ul>
<li><a href="ct_hooks.html">
                  Top of manual page
                </a></li>
<li title="Module:init-2"><a href="ct_hooks.html#Module:init-2">Module:init/2</a></li>
<li title="Module:pre_init_per_suite-3"><a href="ct_hooks.html#Module:pre_init_per_suite-3">Module:pre_init_per_suite/3</a></li>
<li title="Module:post_init_per_suite-4"><a href="ct_hooks.html#Module:post_init_per_suite-4">Module:post_init_per_suite/4</a></li>
<li title="Module:pre_init_per_group-3"><a href="ct_hooks.html#Module:pre_init_per_group-3">Module:pre_init_per_group/3</a></li>
<li title="Module:post_init_per_group-4"><a href="ct_hooks.html#Module:post_init_per_group-4">Module:post_init_per_group/4</a></li>
<li title="Module:pre_init_per_testcase-3"><a href="ct_hooks.html#Module:pre_init_per_testcase-3">Module:pre_init_per_testcase/3</a></li>
<li title="Module:post_end_per_testcase-4"><a href="ct_hooks.html#Module:post_end_per_testcase-4">Module:post_end_per_testcase/4</a></li>
<li title="Module:pre_end_per_group-3"><a href="ct_hooks.html#Module:pre_end_per_group-3">Module:pre_end_per_group/3</a></li>
<li title="Module:post_end_per_group-4"><a href="ct_hooks.html#Module:post_end_per_group-4">Module:post_end_per_group/4</a></li>
<li title="Module:pre_end_per_suite-3"><a href="ct_hooks.html#Module:pre_end_per_suite-3">Module:pre_end_per_suite/3</a></li>
<li title="Module:post_end_per_suite-4"><a href="ct_hooks.html#Module:post_end_per_suite-4">Module:post_end_per_suite/4</a></li>
<li title="Module:on_tc_fail-3"><a href="ct_hooks.html#Module:on_tc_fail-3">Module:on_tc_fail/3</a></li>
<li title="Module:on_tc_skip-3"><a href="ct_hooks.html#Module:on_tc_skip-3">Module:on_tc_skip/3</a></li>
<li title="Module:terminate-1"><a href="ct_hooks.html#Module:terminate-1">Module:terminate/1</a></li>
<li title="Module:id-1"><a href="ct_hooks.html#Module:id-1">Module:id/1</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<!-- refpage --><center><h1>ct</h1></center>

<h3>MODULE</h3>
<div class="REFBODY">ct</div>
<h3>MODULE SUMMARY</h3>
<div class="REFBODY">Main user interface for the Common Test framework.</div>
<h3>DESCRIPTION</h3>
<div class="REFBODY"><p>
<p>Main user interface for the Common Test framework.</p>
  
   <p> This module implements the command line interface for running
   tests and some basic functions for common test case issues
   such as configuration and logging. </p>
  
   <p><strong>Test Suite Support Macros</strong></p>
  
   <p>The <span class="code">config</span> macro is defined in <span class="code">ct.hrl</span>. This
   macro should be used to retrieve information from the
   <span class="code">Config</span> variable sent to all test cases. It is used with two
   arguments, where the first is the name of the configuration
   variable you wish to retrieve, and the second is the <span class="code">Config</span>
   variable supplied to the test case.</p>
  
   <p>Possible configuration variables include:</p>
   <ul>
     <li><p><span class="code">data_dir</span>  - Data file directory.</p></li>
     <li><p><span class="code">priv_dir</span>  - Scratch file directory.</p></li>
     <li><p>Whatever added by <span class="code">init_per_suite/1</span> or
     <span class="code">init_per_testcase/2</span> in the test suite.</p></li>
   </ul></p></div>
<h3><a name="id89254">DATA TYPES</a></h3>
<div class="REFBODY">
<a name="types"></a>

<dl>
<dt><strong><span class="code">handle() = handle() (see module ct_gen_conn) | term()</span></strong></dt>
<dd>
<a name="type-handle"></a>
<p>The identity of a
   specific connection.</p>
</dd>
<dt><strong><span class="code">target_name() = var_name()</span></strong></dt>
<dd>
<a name="type-target_name"></a>
<p>The name of a target.
  </p>
</dd>
<dt><strong><span class="code">var_name() = atom()</span></strong></dt>
<dd>
<a name="type-var_name"></a>
<p>A variable name which is specified when
   <span class="code">ct:require/2</span> is called,
   e.g. <span class="code">ct:require(mynodename,{node,[telnet]})</span>
  </p>
</dd>
</dl>
</div>
<h3>EXPORTS</h3>
<p><a name="abort_current_testcase-1"><span class="bold_code">abort_current_testcase(Reason) -&gt; ok | {error, no_testcase_running}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="abort_current_testcase-1"></a>

<p>When calling this function, the currently executing test case will be aborted.
        It is the user's responsibility to know for sure which test case is currently
  	 executing. The function is therefore only safe to call from a function which
  	 has been called (or synchronously invoked) by the test case.</p>
  
        <p><span class="code">Reason</span>, the reason for aborting the test case, is printed
        in the test case log.</p>
</p></div>
<p><a name="add_config-2"><span class="bold_code">add_config(Callback, Config) -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Callback = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Config = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="add_config-2"></a>

<p>This function loads configuration variables using the
   	 given callback module and configuration string. Callback module
  	 should be either loaded or present in the code part. Loaded
  	 configuration variables can later be removed using
  	 <span class="code">remove_config/2</span> function.</p>
</p></div>
<p><a name="break-1"><span class="bold_code">break(Comment) -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Comment = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = {multiple_cases_running, TestCases} | 'enable break with release_shell option'</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">TestCases = [atom()]</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="break-1"></a>

<p>This function will cancel any active timetrap and pause the
         execution of the current test case until the user calls the
         <span class="code">continue/0</span> function. It gives the user the opportunity
         to interact with the erlang node running the tests, e.g. for
         debugging purposes or for manually executing a part of the
         test case. If a parallel group is executing, <span class="code">break/2</span>
         should be called instead.</p>
        <p>A cancelled timetrap will not be automatically
         reactivated after the break, but must be started exlicitly with
         <span class="code">ct:timetrap/1</span></p>
        <p>In order for the break/continue functionality to work,
         Common Test must release the shell process controlling stdin.
         This is done by setting the <span class="code">release_shell</span> start option
         to <span class="code">true</span>. See the User's Guide for more information.</p>
</p></div>
<p><a name="break-2"><span class="bold_code">break(TestCase, Comment) -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">TestCase = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Comment = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = 'test case not running' | 'enable break with release_shell option'</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="break-2"></a>

<p>This function works the same way as <span class="code">break/1</span>,
         only the <span class="code">TestCase</span> argument makes it possible to
         pause a test case executing in a parallel group. The
         <span class="code">continue/1</span> function should be used to resume
         execution of <span class="code">TestCase</span>.</p>
        <p>See <span class="code">break/1</span> for more details.</p>
</p></div>
<p><a name="capture_get-0"><span class="bold_code">capture_get() -&gt; ListOfStrings</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">ListOfStrings = [string()]</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="capture_get-0"></a>
<p>Equivalent to <span class="bold_code"><a href="#capture_get-1">capture_get([default])</a></span>.</p>
</p></div>
<p><a name="capture_get-1"><span class="bold_code">capture_get(ExclCategories) -&gt; ListOfStrings</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">ExclCategories = [atom()]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">ListOfStrings = [string()]</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="capture_get-1"></a>

<p>Return and purge the list of text strings buffered
   during the latest session of capturing printouts to stdout.
   With <span class="code">ExclCategories</span> it's possible to specify
   log categories that should be ignored in <span class="code">ListOfStrings</span>.
   If <span class="code">ExclCategories = []</span>, no filtering takes place.
  </p>
<p><strong>See also:</strong> <span class="bold_code"><a href="#capture_start-0">capture_start/0</a></span>, <span class="bold_code"><a href="#capture_stop-0">capture_stop/0</a></span>, <span class="bold_code"><a href="#log-3">log/3</a></span>.</p>
</p></div>
<p><a name="capture_start-0"><span class="bold_code">capture_start() -&gt; ok</span></a><br></p>
<div class="REFBODY"><p><a name="capture_start-0"></a>

<p>Start capturing all text strings printed to stdout during
   execution of the test case.
  </p>
<p><strong>See also:</strong> <span class="bold_code"><a href="#capture_get-1">capture_get/1</a></span>, <span class="bold_code"><a href="#capture_stop-0">capture_stop/0</a></span>.</p>
</p></div>
<p><a name="capture_stop-0"><span class="bold_code">capture_stop() -&gt; ok</span></a><br></p>
<div class="REFBODY"><p><a name="capture_stop-0"></a>

<p>Stop capturing text strings (a session started with
   <span class="code">capture_start/0</span>).
  </p>
<p><strong>See also:</strong> <span class="bold_code"><a href="#capture_get-1">capture_get/1</a></span>, <span class="bold_code"><a href="#capture_start-0">capture_start/0</a></span>.</p>
</p></div>
<p><a name="comment-1"><span class="bold_code">comment(Comment) -&gt; void()</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Comment = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="comment-1"></a>

<p>Print the given <span class="code">Comment</span> in the comment field in   
the table on the test suite result page.</p>
  
   <p>If called several times, only the last comment is printed.
   The test case return value <span class="code">{comment,Comment}</span>
   overwrites the string set by this function.</p>
</p></div>
<p><a name="comment-2"><span class="bold_code">comment(Format, Args) -&gt; void()</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Format = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Args = list()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="comment-2"></a>

<p>Print the formatted string in the comment field in   
the table on the test suite result page.</p>
  
   <p>The <span class="code">Format</span> and <span class="code">Args</span> arguments are
   used in call to <span class="code">io_lib:format/2</span> in order to create
   the comment string. The behaviour of <span class="code">comment/2</span> is
   otherwise the same as the <span class="code">comment/1</span> function (see
   above for details).</p>
</p></div>
<p><a name="continue-0"><span class="bold_code">continue() -&gt; ok</span></a><br></p>
<div class="REFBODY"><p><a name="continue-0"></a>

<p>This function must be called in order to continue after a
        test case (not executing in a parallel group) has called
        <span class="code">break/1</span>.</p>
</p></div>
<p><a name="continue-1"><span class="bold_code">continue(TestCase) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">TestCase = atom()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="continue-1"></a>

<p>This function must be called in order to continue after a
        test case has called <span class="code">break/2</span>. If the paused test case,
        <span class="code">TestCase</span>, executes in a parallel group, this
        function - rather than <span class="code">continue/0</span> - must be used
        in order to let the test case proceed.</p>
</p></div>
<p><a name="decrypt_config_file-2"><span class="bold_code">decrypt_config_file(EncryptFileName, TargetFileName) -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">EncryptFileName = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">TargetFileName = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="decrypt_config_file-2"></a>

<p>This function decrypts <span class="code">EncryptFileName</span>, previously
        generated with <span class="code">encrypt_config_file/2/3</span>. The original
        file contents is saved in the target file. The encryption key, a
        string, must be available in a text file named
        <span class="code">.ct_config.crypt</span> in the current directory, or the
        home directory of the user (it is searched for in that order).</p>
</p></div>
<p><a name="decrypt_config_file-3"><span class="bold_code">decrypt_config_file(EncryptFileName, TargetFileName, KeyOrFile) -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">EncryptFileName = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">TargetFileName = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">KeyOrFile = {key, string()} | {file, string()}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="decrypt_config_file-3"></a>

<p>This function decrypts <span class="code">EncryptFileName</span>, previously
        generated with <span class="code">encrypt_config_file/2/3</span>. The original
        file contents is saved in the target file. The key must have the
        the same value as that used for encryption.</p>
</p></div>
<p><a name="encrypt_config_file-2"><span class="bold_code">encrypt_config_file(SrcFileName, EncryptFileName) -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">SrcFileName = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">EncryptFileName = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="encrypt_config_file-2"></a>

<p>This function encrypts the source config file with DES3 and
        saves the result in file <span class="code">EncryptFileName</span>. The key,
        a string, must be available in a text file named
        <span class="code">.ct_config.crypt</span> in the current directory, or the
        home directory of the user (it is searched for in that order).</p>
        <p>See the Common Test User's Guide for information about using
        encrypted config files when running tests.</p>
        <p>See the <span class="code">crypto</span> application for details on DES3
        encryption/decryption.</p>
</p></div>
<p><a name="encrypt_config_file-3"><span class="bold_code">encrypt_config_file(SrcFileName, EncryptFileName, KeyOrFile) -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">SrcFileName = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">EncryptFileName = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">KeyOrFile = {key, string()} | {file, string()}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="encrypt_config_file-3"></a>

<p>This function encrypts the source config file with DES3 and
        saves the result in the target file <span class="code">EncryptFileName</span>.
        The encryption key to use is either the value in
        <span class="code">{key,Key}</span> or the value stored in the file specified
        by <span class="code">{file,File}</span>.</p>
        <p>See the Common Test User's Guide for information about using
        encrypted config files when running tests.</p>
        <p>See the <span class="code">crypto</span> application for details on DES3
        encryption/decryption.</p>
</p></div>
<p><a name="fail-1"><span class="bold_code">fail(Reason) -&gt; void()</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="fail-1"></a>

<p>Terminate a test case with the given error
   <span class="code">Reason</span>.</p>
</p></div>
<p><a name="fail-2"><span class="bold_code">fail(Format, Args) -&gt; void()</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Format = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Args = list()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="fail-2"></a>

<p>Terminate a test case with an error message specified
   by a format string and a list of values (used as arguments to
   <span class="code">io_lib:format/2</span>).</p>
</p></div>
<p><a name="get_config-1"><span class="bold_code">get_config(Required) -&gt; Value</span></a><br></p>
<div class="REFBODY"><p><a name="get_config-1"></a>
<p>Equivalent to <span class="bold_code"><a href="#get_config-3">get_config(Required, undefined, [])</a></span>.</p>
</p></div>
<p><a name="get_config-2"><span class="bold_code">get_config(Required, Default) -&gt; Value</span></a><br></p>
<div class="REFBODY"><p><a name="get_config-2"></a>
<p>Equivalent to <span class="bold_code"><a href="#get_config-3">get_config(Required, Default, [])</a></span>.</p>
</p></div>
<p><a name="get_config-3"><span class="bold_code">get_config(Required, Default, Opts) -&gt; ValueOrElement</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Required = KeyOrName | {KeyOrName, SubKey} | {KeyOrName, SubKey, SubKey}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">KeyOrName = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">SubKey = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Default = term()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Opts = [Opt] | []</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Opt = element | all</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">ValueOrElement = term() | Default</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="get_config-3"></a>

<p>Read config data values.</p>
  
   <p>This function returns the matching value(s) or config element(s),
   given a config variable key or its associated name
   (if one has been specified with <span class="code">require/2</span> or a
   require statement).</p>
  
   <p>Example, given the following config file:</p>
   <div class="example"><pre>
   {unix,[{telnet,IpAddr},
          {user,[{username,Username},
                 {password,Password}]}]}.</pre></div>
   <p><span class="code">ct:get_config(unix,Default) -&gt;
                            [{telnet,IpAddr},
                             {user, [{username,Username},
                                     {password,Password}]}]</span><br>
   <span class="code">ct:get_config({unix,telnet},Default) -&gt; IpAddr</span><br>
   <span class="code">ct:get_config({unix,user,username},Default) -&gt; Username</span><br>
   <span class="code">ct:get_config({unix,ftp},Default) -&gt; Default</span><br>
   <span class="code">ct:get_config(unknownkey,Default) -&gt; Default</span></p>
  
   <p>If a config variable key has been associated with a name (by
   means of <span class="code">require/2</span> or a require statement), the name
   may be used instead of the key to read the value:</p>
  
   <p><span class="code">ct:require(myuser,{unix,user}) -&gt; ok.</span><br>
   <span class="code">ct:get_config(myuser,Default) -&gt;
            [{username,Username},
             {password,Password}]</span></p>
  
   <p>If a config variable is defined in multiple files and you want to
   access all possible values, use the <span class="code">all</span> option. The
   values will be returned in a list and the order of the elements
   corresponds to the order that the config files were specified at
   startup.</p>
  
   <p>If you want config elements (key-value tuples) returned as result
   instead of values, use the <span class="code">element</span> option.
   The returned elements will then be on the form <span class="code">{Required,Value}</span></p>
  
<p><strong>See also:</strong> <span class="bold_code"><a href="#get_config-1">get_config/1</a></span>, <span class="bold_code"><a href="#get_config-2">get_config/2</a></span>, <span class="bold_code"><a href="#require-1">require/1</a></span>, <span class="bold_code"><a href="#require-2">require/2</a></span>.</p>
</p></div>
<p><a name="get_status-0"><span class="bold_code">get_status() -&gt; TestStatus | {error, Reason} | no_tests_running</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">TestStatus = [StatusElem]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">StatusElem = {current, TestCaseInfo} | {successful, Successful} | {failed, Failed} | {skipped, Skipped} | {total, Total}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">TestCaseInfo = {Suite, TestCase} | [{Suite, TestCase}]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Suite = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">TestCase = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Successful = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Failed = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Skipped = {UserSkipped, AutoSkipped}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">UserSkipped = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">AutoSkipped = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Total = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="get_status-0"></a>

<p>Returns status of ongoing test. The returned list contains info about
        which test case is currently executing (a list of cases when a
        parallel test case group is executing), as well as counters for
        successful, failed, skipped, and total test cases so far.</p>
</p></div>
<p><a name="get_target_name-1"><span class="bold_code">get_target_name(Handle) -&gt; {ok, TargetName} | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Handle = handle()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">TargetName = target_name()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="get_target_name-1"></a>

<p>Return the name of the target that the given connection
   belongs to.</p>
</p></div>
<p><a name="get_timetrap_info-0"><span class="bold_code">get_timetrap_info() -&gt; {Time, Scale}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Time = integer() | infinity</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Scale = true | false</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="get_timetrap_info-0"></a>

<p>Read info about the timetrap set for the current test case.
        <span class="code">Scale</span> indicates if Common Test will attempt to automatically
        compensate timetraps for runtime delays introduced by e.g. tools like
        cover.</p>
</p></div>
<p><a name="install-1"><span class="bold_code">install(Opts) -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Opts = [Opt]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Opt = {config, ConfigFiles} | {event_handler, Modules} | {decrypt, KeyOrFile}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">ConfigFiles = [ConfigFile]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">ConfigFile = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Modules = [atom()]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">KeyOrFile = {key, Key} | {file, KeyFile}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Key = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">KeyFile = string()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="install-1"></a>

<p>Install config files and event handlers.</p>
  
   <p>Run this function once before first test.</p>
  
   <p>Example:<br>
   <span class="code">install([{config,["config_node.ctc","config_user.ctc"]}])</span>.</p>
  
   <p>Note that this function is automatically run by the
   <span class="code">ct_run</span> program.</p>
</p></div>
<p><a name="listenv-1"><span class="bold_code">listenv(Telnet) -&gt; [Env]</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Telnet = term()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Env = {Key, Value}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Key = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Value = string()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="listenv-1"></a>

<p>Performs the listenv command on the given telnet connection
   and returns the result as a list of Key-Value pairs.</p>
</p></div>
<p><a name="log-1"><span class="bold_code">log(Format) -&gt; ok</span></a><br></p>
<div class="REFBODY"><p><a name="log-1"></a>
<p>Equivalent to <span class="bold_code"><a href="#log-4">log(default, 50, Format, [])</a></span>.</p>
</p></div>
<p><a name="log-2"><span class="bold_code">log(X1, X2) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">X1 = Category | Importance | Format</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">X2 = Format | Args</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="log-2"></a>
<p>Equivalent to <span class="bold_code"><a href="#log-4">log(Category, Importance, Format, Args)</a></span>.</p>
</p></div>
<p><a name="log-3"><span class="bold_code">log(X1, X2, X3) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">X1 = Category | Importance</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">X2 = Importance | Format</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">X3 = Format | Args</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="log-3"></a>
<p>Equivalent to <span class="bold_code"><a href="#log-4">log(Category, Importance, Format, Args)</a></span>.</p>
</p></div>
<p><a name="log-4"><span class="bold_code">log(Category, Importance, Format, Args) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Category = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Importance = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Format = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Args = list()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="log-4"></a>

<p>Printout from a test case to the log file.</p>
  
   <p>This function is meant for printing a string directly from a
   test case to the test case log file.</p>
  
   <p>Default <span class="code">Category</span> is <span class="code">default</span>,
   default <span class="code">Importance</span> is <span class="code">?STD_IMPORTANCE</span>,
   and default value for <span class="code">Args</span> is <span class="code">[]</span>.</p>
   <p>Please see the User's Guide for details on <span class="code">Category</span>
   and <span class="code">Importance</span>.</p>
</p></div>
<p><a name="make_priv_dir-0"><span class="bold_code">make_priv_dir() -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="make_priv_dir-0"></a>

<p>If the test has been started with the create_priv_dir
   option set to manual_per_tc, in order for the test case to use
   the private directory, it must first create it by calling
   this function.</p>
</p></div>
<p><a name="notify-2"><span class="bold_code">notify(Name, Data) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Name = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Data = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="notify-2"></a>

<p>Sends a asynchronous notification of type <span class="code">Name</span> with
        <span class="code">Data</span>to the common_test event manager. This can later be
        caught by any installed event manager. </p>
<p><strong>See also:</strong> <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','stdlib','gen_event.html');">gen_event(3)</a></span>.</p>
</p></div>
<p><a name="pal-1"><span class="bold_code">pal(Format) -&gt; ok</span></a><br></p>
<div class="REFBODY"><p><a name="pal-1"></a>
<p>Equivalent to <span class="bold_code"><a href="#pal-4">pal(default, 50, Format, [])</a></span>.</p>
</p></div>
<p><a name="pal-2"><span class="bold_code">pal(X1, X2) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">X1 = Category | Importance | Format</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">X2 = Format | Args</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="pal-2"></a>
<p>Equivalent to <span class="bold_code"><a href="#pal-4">pal(Category, Importance, Format, Args)</a></span>.</p>
</p></div>
<p><a name="pal-3"><span class="bold_code">pal(X1, X2, X3) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">X1 = Category | Importance</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">X2 = Importance | Format</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">X3 = Format | Args</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="pal-3"></a>
<p>Equivalent to <span class="bold_code"><a href="#pal-4">pal(Category, Importance, Format, Args)</a></span>.</p>
</p></div>
<p><a name="pal-4"><span class="bold_code">pal(Category, Importance, Format, Args) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Category = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Importance = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Format = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Args = list()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="pal-4"></a>

<p>Print and log from a test case.</p>
  
   <p>This function is meant for printing a string from a test case,
   both to the test case log file and to the console.</p>
  
   <p>Default <span class="code">Category</span> is <span class="code">default</span>,
   default <span class="code">Importance</span> is <span class="code">?STD_IMPORTANCE</span>,
   and default value for <span class="code">Args</span> is <span class="code">[]</span>.</p>
   <p>Please see the User's Guide for details on <span class="code">Category</span>
   and <span class="code">Importance</span>.</p>
</p></div>
<p><a name="parse_table-1"><span class="bold_code">parse_table(Data) -&gt; {Heading, Table}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Data = [string()]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Heading = tuple()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Table = [tuple()]</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="parse_table-1"></a>

<p>Parse the printout from an SQL table and return a list of tuples.</p>
  
   <p>The printout to parse would typically be the result of a
   <span class="code">select</span> command in SQL. The returned
   <span class="code">Table</span> is a list of tuples, where each tuple is a row
   in the table.</p>
  
   <p><span class="code">Heading</span> is a tuple of strings representing the
   headings of each column in the table.</p>
</p></div>
<p><a name="print-1"><span class="bold_code">print(Format) -&gt; ok</span></a><br></p>
<div class="REFBODY"><p><a name="print-1"></a>
<p>Equivalent to <span class="bold_code"><a href="#print-4">print(default, 50, Format, [])</a></span>.</p>
</p></div>
<p><a name="print-2"><span class="bold_code">print(X1, X2) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">X1 = Category | Importance | Format</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">X2 = Format | Args</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="print-2"></a>
<p>Equivalent to <span class="bold_code"><a href="#print-4">print(Category, Importance, Format, Args)</a></span>.</p>
</p></div>
<p><a name="print-3"><span class="bold_code">print(X1, X2, X3) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">X1 = Category | Importance</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">X2 = Importance | Format</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">X3 = Format | Args</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="print-3"></a>
<p>Equivalent to <span class="bold_code"><a href="#print-4">print(Category, Importance, Format, Args)</a></span>.</p>
</p></div>
<p><a name="print-4"><span class="bold_code">print(Category, Importance, Format, Args) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Category = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Importance = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Format = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Args = list()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="print-4"></a>

<p>Printout from a test case to the console.</p>
  
   <p>This function is meant for printing a string from a test case
   to the console.</p>
  
   <p>Default <span class="code">Category</span> is <span class="code">default</span>,
   default <span class="code">Importance</span> is <span class="code">?STD_IMPORTANCE</span>,
   and default value for <span class="code">Args</span> is <span class="code">[]</span>.</p>
   <p>Please see the User's Guide for details on <span class="code">Category</span>
   and <span class="code">Importance</span>.</p>
</p></div>
<p><a name="reload_config-1"><span class="bold_code">reload_config(Required) -&gt; ValueOrElement</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Required = KeyOrName | {KeyOrName, SubKey} | {KeyOrName, SubKey, SubKey}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">KeyOrName = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">SubKey = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">ValueOrElement = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="reload_config-1"></a>

<p>Reload config file which contains specified configuration key.</p>
  
   <p>This function performs updating of the configuration data from which the
   given configuration variable was read, and returns the (possibly) new
   value of this variable.</p>
   <p>Note that if some variables were present in the configuration but are not loaded
   using this function, they will be removed from the configuration table together
   with their aliases.</p>
  
</p></div>
<p><a name="remove_config-2"><span class="bold_code">remove_config(Callback, Config) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Callback = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Config = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="remove_config-2"></a>

<p>This function removes configuration variables (together with
  	 their aliases) which were loaded with specified callback module and
  	 configuration string.</p>
</p></div>
<p><a name="require-1"><span class="bold_code">require(Required) -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Required = Key | {Key, SubKeys} | {Key, SubKey, SubKeys}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Key = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">SubKeys = SubKey | [SubKey]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">SubKey = atom()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="require-1"></a>

<p>Check if the required configuration is available. It is possible
   to specify arbitrarily deep tuples as <span class="code">Required</span>. Note that it is
   only the last element of the tuple which can be a list of <span class="code">SubKey</span>s.</p>
  
   <p>Example 1: require the variable <span class="code">myvar</span>:</p>
   <div class="example"><pre>ok = ct:require(myvar).</pre></div>
  
   <p>In this case the config file must at least contain:</p>
   <div class="example"><pre>{myvar,Value}.</pre></div>
  
   <p>Example 2: require the key <span class="code">myvar</span> with
   subkeys <span class="code">sub1</span> and <span class="code">sub2</span>:</p>
   <div class="example"><pre>ok = ct:require({myvar,[sub1,sub2]}).</pre></div>
  
   <p>In this case the config file must at least contain:</p>
   <div class="example"><pre>{myvar,[{sub1,Value},{sub2,Value}]}.</pre></div>
  
   <p>Example 3: require the key <span class="code">myvar</span> with
   subkey <span class="code">sub1</span> with <span class="code">subsub1</span>:</p>
   <div class="example"><pre>ok = ct:require({myvar,sub1,sub2}).</pre></div>
  
   <p>In this case the config file must at least contain:</p>
   <div class="example"><pre>{myvar,[{sub1,[{sub2,Value}]}]}.</pre></div>
  
<p><strong>See also:</strong> <span class="bold_code"><a href="#get_config-1">get_config/1</a></span>, <span class="bold_code"><a href="#get_config-2">get_config/2</a></span>, <span class="bold_code"><a href="#get_config-3">get_config/3</a></span>, <span class="bold_code"><a href="#require-2">require/2</a></span>.</p>
</p></div>
<p><a name="require-2"><span class="bold_code">require(Name, Required) -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Name = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Required = Key | {Key, SubKey} | {Key, SubKey, SubKey}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">SubKey = Key</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Key = atom()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="require-2"></a>

<p>Check if the required configuration is available, and give it
   a name. The semantics for <span class="code">Required</span> is the same as in
   <span class="code">required/1</span> except that it is not possible to specify a list
   of <span class="code">SubKey</span>s.</p>
  
   <p>If the requested data is available, the sub entry will be
   associated with <span class="code">Name</span> so that the value of the element
   can be read with <span class="code">get_config/1,2</span> provided
   <span class="code">Name</span> instead of the whole <span class="code">Required</span> term.</p>
  
   <p>Example: Require one node with a telnet connection and an
   ftp connection. Name the node <span class="code">a</span>:
   </p><div class="example"><pre>ok = ct:require(a,{machine,node}).</pre></div><p>
   All references to this node may then use the node name.
   E.g. you can fetch a file over ftp like this:</p>
   <div class="example"><pre>ok = ct:ftp_get(a,RemoteFile,LocalFile).</pre></div>
  
   <p>For this to work, the config file must at least contain:</p>
   <div class="example"><pre>{machine,[{node,[{telnet,IpAddr},{ftp,IpAddr}]}]}.</pre></div>
  
   <div class="note">
<div class="label">Note</div>
<div class="content"><p><p>The behaviour of this function changed radically in common_test
   1.6.2. In order too keep some backwards compatability it is still possible
   to do: <br><span class="code">ct:require(a,{node,[telnet,ftp]}).</span><br>
   This will associate the name <span class="code">a</span> with the top level <span class="code">node</span> entry.
   For this to work, the config file must at least contain:<br>
   <span class="code">{node,[{telnet,IpAddr},{ftp,IpAddr}]}.</span></p></p></div>
</div>
  
<p><strong>See also:</strong> <span class="bold_code"><a href="#get_config-1">get_config/1</a></span>, <span class="bold_code"><a href="#get_config-2">get_config/2</a></span>, <span class="bold_code"><a href="#get_config-3">get_config/3</a></span>, <span class="bold_code"><a href="#require-1">require/1</a></span>.</p>
</p></div>
<p><a name="run-1"><span class="bold_code">run(TestDirs) -&gt; Result</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">TestDirs = TestDir | [TestDir]</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="run-1"></a>

<p>Run all test cases in all suites in the given directories.</p>
<p><strong>See also:</strong> <span class="bold_code"><a href="#run-3">run/3</a></span>.</p>
</p></div>
<p><a name="run-2"><span class="bold_code">run(TestDir, Suite) -&gt; Result</span></a><br></p>
<div class="REFBODY"><p><a name="run-2"></a>

<p>Run all test cases in the given suite.</p>
<p><strong>See also:</strong> <span class="bold_code"><a href="#run-3">run/3</a></span>.</p>
</p></div>
<p><a name="run-3"><span class="bold_code">run(TestDir, Suite, Cases) -&gt; Result</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">TestDir = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Suite = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Cases = atom() | [atom()]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Result = [TestResult] | {error, Reason}</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="run-3"></a>

<p>Run the given test case(s).</p>
  
   <p>Requires that <span class="code">ct:install/1</span> has been run first.</p>
  
   <p>Suites (*_SUITE.erl) files must be stored in
   <span class="code">TestDir</span> or <span class="code">TestDir/test</span>.  All suites
   will be compiled when test is run.</p>
</p></div>
<p><a name="run_test-1"><span class="bold_code">run_test(Opts) -&gt; Result</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Opts = [OptTuples]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">OptTuples = {dir, TestDirs} | {suite, Suites} | {group, Groups} | {testcase, Cases} | {spec, TestSpecs} | {label, Label} | {config, CfgFiles} | {userconfig, UserConfig} | {allow_user_terms, Bool} | {logdir, LogDir} | {silent_connections, Conns} | {stylesheet, CSSFile} | {cover, CoverSpecFile} | {step, StepOpts} | {event_handler, EventHandlers} | {include, InclDirs} | {auto_compile, Bool} | {create_priv_dir, CreatePrivDir} | {multiply_timetraps, M} | {scale_timetraps, Bool} | {repeat, N} | {duration, DurTime} | {until, StopTime} | {force_stop, Bool} | {decrypt, DecryptKeyOrFile} | {refresh_logs, LogDir} | {logopts, LogOpts} | {verbosity, VLevels} | {basic_html, Bool} | {ct_hooks, CTHs} | {enable_builtin_hooks, Bool} | {release_shell, Bool}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">TestDirs = [string()] | string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Suites = [string()] | [atom()] | string() | atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Cases = [atom()] | atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Groups = GroupNameOrPath | [GroupNameOrPath]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">GroupNameOrPath = [atom()] | atom() | all</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">TestSpecs = [string()] | string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Label = string() | atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">CfgFiles = [string()] | string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">UserConfig = [{CallbackMod, CfgStrings}] | {CallbackMod, CfgStrings}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">CallbackMod = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">CfgStrings = [string()] | string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">LogDir = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Conns = all | [atom()]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">CSSFile = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">CoverSpecFile = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">StepOpts = [StepOpt] | []</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">StepOpt = config | keep_inactive</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">EventHandlers = EH | [EH]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">EH = atom() | {atom(), InitArgs} | {[atom()], InitArgs}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">InitArgs = [term()]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">InclDirs = [string()] | string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">CreatePrivDir = auto_per_run | auto_per_tc | manual_per_tc</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">M = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">N = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">DurTime = string(HHMMSS)</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">StopTime = string(YYMoMoDDHHMMSS) | string(HHMMSS)</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">DecryptKeyOrFile = {key, DecryptKey} | {file, DecryptFile}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">DecryptKey = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">DecryptFile = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">LogOpts = [LogOpt]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">LogOpt = no_nl | no_src</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">VLevels = VLevel | [{Category, VLevel}]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">VLevel = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Category = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">CTHs = [CTHModule | {CTHModule, CTHInitArgs}]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">CTHModule = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">CTHInitArgs = term()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Result = {Ok, Failed, {UserSkipped, AutoSkipped}} | TestRunnerPid | {error, Reason}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Ok = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Failed = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">UserSkipped = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">AutoSkipped = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">TestRunnerPid = pid()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="run_test-1"></a>

<p>Run tests as specified by the combination of options in <span class="code">Opts</span>.
   The options are the same as those used with the
   <span class="bold_code"><a href="ct_run.html#ct_run"><span class="code">ct_run</span></a></span> program.
   Note that here a <span class="code">TestDir</span> can be used to point out the path to
   a <span class="code">Suite</span>. Note also that the option <span class="code">testcase</span>
   corresponds to the <span class="code">-case</span> option in the <span class="code">ct_run</span>
   program. Configuration files specified in <span class="code">Opts</span> will be
   installed automatically at startup.</p>
   <p><span class="code">TestRunnerPid</span> is returned if <span class="code">release_shell == true</span>
   (see <span class="code">break/1</span> for details).</p>
   <p><span class="code">Reason</span> indicates what type of error has been encountered.</p>
</p></div>
<p><a name="run_testspec-1"><span class="bold_code">run_testspec(TestSpec) -&gt; Result</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">TestSpec = [term()]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Result = {Ok, Failed, {UserSkipped, AutoSkipped}} | {error, Reason}</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Ok = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Failed = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">UserSkipped = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">AutoSkipped = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="run_testspec-1"></a>

<p>Run test specified by <span class="code">TestSpec</span>. The terms are
   the same as those used in test specification files.
   </p><p><span class="code">Reason</span> indicates what type of error has been encountered.</p>
</p></div>
<p><a name="sleep-1"><span class="bold_code">sleep(Time) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Time = {hours, Hours} | {minutes, Mins} | {seconds, Secs} | Millisecs | infinity</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Hours = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Mins = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Secs = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Millisecs = integer() | float()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="sleep-1"></a>

<p>This function, similar to <span class="code">timer:sleep/1</span>, suspends the test
        case for specified time. However, this function also multiplies
        <span class="code">Time</span> with the 'multiply_timetraps' value (if set) and under
        certain circumstances also scales up the time automatically
        if 'scale_timetraps' is set to true (default is false).</p>
</p></div>
<p><a name="start_interactive-0"><span class="bold_code">start_interactive() -&gt; ok</span></a><br></p>
<div class="REFBODY"><p><a name="start_interactive-0"></a>

<p>Start CT in interactive mode.</p>
  
   <p>From this mode all test case support functions can be executed
   directly from the erlang shell. The interactive mode can also be
   started from the OS command line with <span class="code">ct_run -shell
   [-config File...]</span>.</p>
  
   <p>If any functions using "required config data" (e.g. telnet or
   ftp functions) are to be called from the erlang shell, config data
   must first be required with <span class="code">ct:require/2</span>.</p>
  
   <p>Example:<br>
   <span class="code">&gt; ct:require(unix_telnet, unix).</span><br>
   <span class="code">ok</span><br>
   <span class="code">&gt; ct_telnet:open(unix_telnet).</span><br>
   <span class="code">{ok,&lt;0.105.0&gt;}</span><br>
   <span class="code">&gt; ct_telnet:cmd(unix_telnet, "ls .").</span><br>
   <span class="code">{ok,["ls","file1  ...",...]}</span></p>
</p></div>
<p><a name="step-3"><span class="bold_code">step(TestDir, Suite, Case) -&gt; Result</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Case = atom()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="step-3"></a>

<p>Step through a test case with the debugger.</p>
<p><strong>See also:</strong> <span class="bold_code"><a href="#run-3">run/3</a></span>.</p>
</p></div>
<p><a name="step-4"><span class="bold_code">step(TestDir, Suite, Case, Opts) -&gt; Result</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Case = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Opts = [Opt] | []</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Opt = config | keep_inactive</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="step-4"></a>

<p>Step through a test case with the debugger. If the
   <span class="code">config</span> option has been given, breakpoints will
   be set also on the configuration functions in <span class="code">Suite</span>.</p>
<p><strong>See also:</strong> <span class="bold_code"><a href="#run-3">run/3</a></span>.</p>
</p></div>
<p><a name="stop_interactive-0"><span class="bold_code">stop_interactive() -&gt; ok</span></a><br></p>
<div class="REFBODY"><p><a name="stop_interactive-0"></a>

<p>Exit the interactive mode.</p>
<p><strong>See also:</strong> <span class="bold_code"><a href="#start_interactive-0">start_interactive/0</a></span>.</p>
</p></div>
<p><a name="sync_notify-2"><span class="bold_code">sync_notify(Name, Data) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Name = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Data = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="sync_notify-2"></a>

<p>Sends a synchronous notification of type <span class="code">Name</span> with
        <span class="code">Data</span>to the common_test event manager. This can later be
        caught by any installed event manager. </p>
<p><strong>See also:</strong> <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','stdlib','gen_event.html');">gen_event(3)</a></span>.</p>
</p></div>
<p><a name="testcases-2"><span class="bold_code">testcases(TestDir, Suite) -&gt; Testcases | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">TestDir = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Suite = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Testcases = list()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="testcases-2"></a>

<p>Returns all test cases in the specified suite.</p>
</p></div>
<p><a name="timetrap-1"><span class="bold_code">timetrap(Time) -&gt; ok</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">Time = {hours, Hours} | {minutes, Mins} | {seconds, Secs} | Millisecs | infinity | Func</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Hours = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Mins = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Secs = integer()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Millisecs = integer() | float()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Func = {M, F, A} | function()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">M = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">F = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">A = list()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="timetrap-1"></a>

<p>Use this function to set a new timetrap for the running test case.
        If the argument is <span class="code">Func</span>, the timetrap will be triggered
        when this function returns. <span class="code">Func</span> may also return a new
        <span class="code">Time</span> value, which in that case will be the value for the
        new timetrap.</p>
</p></div>
<p><a name="userdata-2"><span class="bold_code">userdata(TestDir, Suite) -&gt; SuiteUserData | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">TestDir = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Suite = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">SuiteUserData = [term()]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="userdata-2"></a>

<p>Returns any data specified with the tag <span class="code">userdata</span>
   in the list of tuples returned from <span class="code">Suite:suite/0</span>.</p>
</p></div>
<p><a name="userdata-3"><span class="bold_code">userdata(TestDir, Suite, Case::GroupOrCase) -&gt; TCUserData | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
<div class="REFTYPES">
<span class="bold_code">TestDir = string()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Suite = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">GroupOrCase = {group, GroupName} | atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">GroupName = atom()</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">TCUserData = [term()]</span><br>
</div>
<div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
</div>
<div class="REFBODY"><p><a name="userdata-3"></a>

<p>Returns any data specified with the tag <span class="code">userdata</span>
   in the list of tuples returned from <span class="code">Suite:group(GroupName)</span>
   or <span class="code">Suite:Case()</span>.</p>
</p></div>


 
 </div>
<div class="footer">
<hr>
<p>Copyright © 2003-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>