1ct_run(1) User Commands ct_run(1)
2
3
4
6 ct_run - Program used for starting Common Test from the
7 OS command line.
8
10 The ct_run program is automatically installed with Erlang/OTP and the
11 Common Test application (for more information, see section Installation
12 in the User's Guide). The program accepts different start flags. Some
13 flags trigger ct_run to start Common Test and pass on data to it. Some
14 flags start an Erlang node prepared for running Common Test in a par‐
15 ticular mode.
16
17 The interface function ct:run_test/1, corresponding to the ct_run pro‐
18 gram, is used for starting Common Test from the Erlang shell (or an Er‐
19 lang program). For details, see the ct manual page.
20
21 ct_run also accepts Erlang emulator flags. These are used when ct_run
22 calls erl to start the Erlang node (this makes it possible to add di‐
23 rectories to the code server path, change the cookie on the node, start
24 more applications, and so on).
25
26 With the optional flag -erl_args, options on the ct_run command line
27 can be divided into two groups:
28
29 * One group that Common Test is to process (those preceding
30 -erl_args).
31
32 * One group that Common Test is to ignore and pass on directly to the
33 emulator (those following -erl_args).
34
35 Options preceding -erl_args that Common Test does not recognize are
36 also passed on to the emulator untouched. By -erl_args the user can
37 specify flags with the same name, but with different destinations, on
38 the ct_run command line.
39
40 If flags -pa or -pz are specified in the Common Test group of options
41 (preceding -erl_args), relative directories are converted to absolute
42 and reinserted into the code path by Common Test. This is to avoid
43 problems loading user modules when Common Test changes working direc‐
44 tory during test runs. However, Common Test ignores flags -pa and -pz
45 following -erl_args on the command line. These directories are added to
46 the code path normally (that is, on specified form).
47
48 Exit status is set before the program ends. Value 0 indicates a suc‐
49 cessful test result, 1 indicates one or more failed or auto-skipped
50 test cases, and 2 indicates test execution failure.
51
52 If ct_run is called with option -help, it prints all valid start flags
53 to stdout.
54
56 ct_run -dir TestDir1 TestDir2 .. TestDirN |
57 [-dir TestDir] -suite Suite1 Suite2 .. SuiteN
58 [-group Groups1 Groups2 .. GroupsN] [-case Case1 Case2 .. CaseN]
59 [-step [config | keep_inactive]]
60 [-config ConfigFile1 ConfigFile2 .. ConfigFileN]
61 [-userconfig CallbackModule1 ConfigString1 and CallbackModule2
62 ConfigString2 and .. CallbackModuleN ConfigStringN]
63 [-decrypt_key Key] | [-decrypt_file KeyFile]
64 [-label Label]
65 [-logdir LogDir]
66 [-logopts LogOpts]
67 [-verbosity GenVLevel | [Category1 VLevel1 and
68 Category2 VLevel2 and .. CategoryN VLevelN]]
69 [-silent_connections [ConnType1 ConnType2 .. ConnTypeN]]
70 [-stylesheet CSSFile]
71 [-cover CoverCfgFile]
72 [-cover_stop Bool]
73 [-event_handler EvHandler1 EvHandler2 .. EvHandlerN] |
74 [-event_handler_init EvHandler1 InitArg1 and
75 EvHandler2 InitArg2 and .. EvHandlerN InitArgN]
76 [-include InclDir1 InclDir2 .. InclDirN]
77 [-no_auto_compile]
78 [-abort_if_missing_suites]
79 [-multiply_timetraps Multiplier]
80 [-scale_timetraps]
81 [-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
82 [-repeat N] |
83 [-duration HHMMSS [-force_stop [skip_rest]]] |
84 [-until [YYMoMoDD]HHMMSS [-force_stop [skip_rest]]]
85 [-basic_html]
86 [-no_esc_chars]
87 [-keep_logs all | NLogs]
88 [-ct_hooks CTHModule1 CTHOpts1 and CTHModule2 CTHOpts2 and ..
89 CTHModuleN CTHOptsN]
90 [-exit_status ignore_config]
91 [-help]
92
94 ct_run -spec TestSpec1 TestSpec2 .. TestSpecN
95 [-join_specs]
96 [-config ConfigFile1 ConfigFile2 .. ConfigFileN]
97 [-userconfig CallbackModule1 ConfigString1 and CallbackModule2
98 ConfigString2 and .. and CallbackModuleN ConfigStringN]
99 [-decrypt_key Key] | [-decrypt_file KeyFile]
100 [-label Label]
101 [-logdir LogDir]
102 [-logopts LogOpts]
103 [-verbosity GenVLevel | [Category1 VLevel1 and
104 Category2 VLevel2 and .. CategoryN VLevelN]]
105 [-allow_user_terms]
106 [-silent_connections [ConnType1 ConnType2 .. ConnTypeN]]
107 [-stylesheet CSSFile]
108 [-cover CoverCfgFile]
109 [-cover_stop Bool]
110 [-event_handler EvHandler1 EvHandler2 .. EvHandlerN] |
111 [-event_handler_init EvHandler1 InitArg1 and
112 EvHandler2 InitArg2 and .. EvHandlerN InitArgN]
113 [-include InclDir1 InclDir2 .. InclDirN]
114 [-no_auto_compile]
115 [-abort_if_missing_suites]
116 [-multiply_timetraps Multiplier]
117 [-scale_timetraps]
118 [-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
119 [-repeat N] |
120 [-duration HHMMSS [-force_stop [skip_rest]]] |
121 [-until [YYMoMoDD]HHMMSS [-force_stop [skip_rest]]]
122 [-basic_html]
123 [-no_esc_chars]
124 [-keep_logs all | NLogs]
125 [-ct_hooks CTHModule1 CTHOpts1 and CTHModule2 CTHOpts2 and ..
126 CTHModuleN CTHOptsN]
127 [-exit_status ignore_config]
128
130 ct_run -refresh_logs [-logdir LogDir] [-basic_html]
131 [-keep_logs all | NLogs]
132
134 ct_run -shell
135 [-config ConfigFile1 ConfigFile2 ... ConfigFileN]
136 [-userconfig CallbackModule1 ConfigString1 and CallbackModule2
137 ConfigString2 and .. and CallbackModuleN ConfigStringN]
138 [-decrypt_key Key] | [-decrypt_file KeyFile]
139
141 ct_run -ctmaster
142
144 For information about the start flags, see section Running Tests and
145 Analyzing Results in the User's Guide.
146
147
148
149Ericsson AB common_test 1.25.1 ct_run(1)