Erlang logo
User's Guide
Reference Manual
Release Notes
PDF
Top

Common Test
Reference Manual
Version 1.5


Expand All
Contract All

Table of Contents

run_test

COMMAND

run_test

COMMAND SUMMARY

Program used for starting Common Test from the OS command line.

DESCRIPTION

The run_test program is automatically installed with Erlang/OTP and Common Test (please see the Installation chapter in the Common Test User's Guide for more information). The program accepts a number of different start flags. Some flags trigger run_test to start the Common Test application and pass on data to it. Some flags start an Erlang node prepared for running Common Test in a particular mode.

run_test also accepts Erlang emulator flags. These are used when run_test calls erl to start the Erlang node (making it possible to e.g. add directories to the code server path, change the cookie on the node, start additional applications, etc).

With the optional flag:

-erl_args

it's possible to divide the options on the run_test command line into two groups, one that Common Test should process (those preceding -erl_args), and one it should completely ignore and pass on directly to the emulator (those following -erl_args). Options preceding -erl_args that Common Test doesn't recognize, also get passed on to the emulator untouched. By means of -erl_args the user may specify flags with the same name, but with different destinations, on the run_test command line.

If -pa or -pz flags are specified in the Common Test group of options (preceding -erl_args), relative directories will be converted to absolute and re-inserted into the code path by Common Test (to avoid problems loading user modules when Common Test changes working directory during test runs). Common Test will however ignore -pa and -pz flags following -erl_args on the command line. These directories are added to the code path normally (i.e. on specified form)

If run_test is called with option:

-help

it prints all valid start flags to stdout.

Run tests from command line

	run_test [-dir TestDir1 TestDir2 .. TestDirN] |
	[-suite Suite1 Suite2 .. SuiteN
	 [[-group Group1 Group2 .. GroupN] [-case Case1 Case2 .. CaseN]]]
	[-step [config | keep_inactive]]
	[-config ConfigFile1 ConfigFile2 .. ConfigFileN]
	[-userconfig CallbackModule1 ConfigString1 and CallbackModule2
	 ConfigString2 and .. and CallbackModuleN ConfigStringN]
	[-decrypt_key Key] | [-decrypt_file KeyFile]
	[-logdir LogDir]
	[-silent_connections [ConnType1 ConnType2 .. ConnTypeN]]
	[-stylesheet CSSFile]
	[-cover CoverCfgFile]
	[-event_handler EvHandler1 EvHandler2 .. EvHandlerN] |
        [-event_handler_init EvHandler1 InitArg1 and
	 EvHandler2 InitArg2 and .. EvHandlerN InitArgN]
	[-include InclDir1 InclDir2 .. InclDirN]
	[-no_auto_compile]
	[-muliply_timetraps Multiplier]
	[-scale_timetraps]
        [-repeat N [-force_stop]] |
        [-duration HHMMSS [-force_stop]] |
        [-until [YYMoMoDD]HHMMSS [-force_stop]]
	[-basic_html]

Run tests using test specification

	run_test -spec TestSpec1 TestSpec2 .. TestSpecN
	[-config ConfigFile1 ConfigFile2 .. ConfigFileN]
	[-userconfig CallbackModule1 ConfigString1 and CallbackModule2
         ConfigString2 and .. and CallbackModuleN ConfigStringN]
	[-decrypt_key Key] | [-decrypt_file KeyFile]
	[-logdir LogDir]
	[-allow_user_terms]
	[-silent_connections [ConnType1 ConnType2 .. ConnTypeN]]
	[-stylesheet CSSFile]
	[-cover CoverCfgFile]
	[-event_handler EvHandler1 EvHandler2 .. EvHandlerN] |
        [-event_handler_init EvHandler1 InitArg1 and
	 EvHandler2 InitArg2 and .. EvHandlerN InitArgN]
	[-include InclDir1 InclDir2 .. InclDirN]
	[-no_auto_compile]
	[-muliply_timetraps Multiplier]
	[-scale_timetraps]
        [-repeat N [-force_stop]] |
        [-duration HHMMSS [-force_stop]] |
        [-until [YYMoMoDD]HHMMSS [-force_stop]]
	[-basic_html]

Run tests in web based GUI

        run_test -vts [-browser Browser]
	[-config ConfigFile1 ConfigFile2 .. ConfigFileN]
	[-userconfig CallbackModule1 ConfigString1 and CallbackModule2
         ConfigString2 and .. and CallbackModuleN ConfigStringN]
	[-decrypt_key Key] | [-decrypt_file KeyFile]
        [-dir TestDir1 TestDir2 .. TestDirN] |
        [-suite Suite [[-group Group] [-case Case]]]
	[-include InclDir1 InclDir2 .. InclDirN]
	[-no_auto_compile]
	[-muliply_timetraps Multiplier]
	[-scale_timetraps]
	[-basic_html]

Refresh the HTML index files

	run_test -refresh_logs [-logdir LogDir] [-basic_html]

Run CT in interactive mode

	run_test -shell
	[-config ConfigFile1 ConfigFile2 ... ConfigFileN]
	[-userconfig CallbackModule1 ConfigString1 and CallbackModule2
         ConfigString2 and .. and CallbackModuleN ConfigStringN]
	[-decrypt_key Key] | [-decrypt_file KeyFile]

Start a Common Test Master node

	run_test -ctmaster

See also

Please read the Running Test Suites chapter in the Common Test User's Guide for information about the meaning of the different start flags.