aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/doc/src/ct_master.xml
blob: 6bde4644c69f4c1bf86204b51d3bce5effa12f9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>2010</year><year>2016</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

    </legalnotice>

    <title>ct_master</title>
    <prepared></prepared>
    <responsible></responsible>
    <docno></docno>
    <approved></approved>
    <checked></checked>
    <date></date>
    <rev>A</rev>
    <file>ct_master.xml</file>
  </header>
  <module>ct_master</module>
  <modulesummary>Distributed test execution control for Common Test.</modulesummary>

<description>

    <p>Distributed test execution control for <c>Common Test</c>.</p>

    <p>This module exports functions for running <c>Common Test</c> nodes on
      multiple hosts in parallel.</p>

</description>

  <funcs>
    <func>
      <name>abort() -&gt; ok</name>
      <fsummary>Stops all running tests.</fsummary>
      <desc><marker id="abort-0"/>
        <p>Stops all running tests.</p>
      </desc>
    </func>

    <func>
      <name>abort(Nodes) -&gt; ok</name>
      <fsummary>Stops tests on specified nodes.</fsummary>
      <type>
        <v>Nodes = atom() | [atom()]</v>
      </type>
      <desc><marker id="abort-1"/>
        <p>Stops tests on specified nodes.</p>
      </desc>
    </func>

    <func>
      <name>basic_html(Bool) -&gt; ok</name>
      <fsummary>If set to true, the ct_master logs are written on a primitive
        HTML format, not using the <c>Common Test</c> CSS style sheet.</fsummary>
      <type>
        <v>Bool = true | false</v>
      </type>
      <desc><marker id="basic_html-1"/>
        <p>If set to <c>true</c>, the <c>ct_master logs</c> are written on a
          primitive HTML format, not using the <c>Common Test</c> CSS style
          sheet.</p>
      </desc>
    </func>

    <func>
      <name>get_event_mgr_ref() -&gt; MasterEvMgrRef</name>
      <fsummary>Gets a reference to the <c>Common Test</c> master event
        manager.</fsummary>
      <type>
        <v>MasterEvMgrRef = atom()</v>
      </type>
      <desc><marker id="get_event_mgr_ref-0"/>
        <p>Gets a reference to the <c>Common Test</c> master event manager.
          The reference can be used to, for example, add a user-specific
          event handler while tests are running.</p>

        <p><em>Example:</em></p>

        <pre>
 gen_event:add_handler(ct_master:get_event_mgr_ref(), my_ev_h, [])</pre>
      </desc>
    </func>

    <func>
      <name>progress() -&gt; [{Node, Status}]</name>
      <fsummary>Returns test progress.</fsummary>
      <type>
        <v>Node = atom()</v>
        <v>Status = finished_ok | ongoing | aborted | {error, Reason}</v>
        <v>Reason = term()</v>
      </type>
      <desc><marker id="progress-0"/>
        <p>Returns test progress. If <c>Status</c> is <c>ongoing</c>, tests
          are running on the node and are not yet finished.</p>
      </desc>
    </func>

    <func>
      <name>run(TestSpecs) -&gt; ok</name>
      <fsummary>Equivalent to run(TestSpecs, false, [], []).</fsummary>
      <type>
        <v>TestSpecs = string() | [SeparateOrMerged]</v>
      </type>
      <desc><marker id="run-1"/>
        <p>Equivalent to <seealso marker="#run-4"><c>ct_master:run(TestSpecs,
          false, [], [])</c></seealso>.</p>
      </desc>
    </func>

    <func>
      <name>run(TestSpecs, InclNodes, ExclNodes) -&gt; ok</name>
      <fsummary>Equivalent to run(TestSpecs, false, InclNodes, ExclNodes).
      </fsummary>
      <type>
        <v>TestSpecs = string() | [SeparateOrMerged]</v>
        <v>SeparateOrMerged = string() | [string()]</v>
        <v>InclNodes = [atom()]</v>
        <v>ExclNodes = [atom()]</v>
      </type>
      <desc><marker id="run-3"/>
        <p>Equivalent to <seealso marker="#run-4"><c>ct_master:run(TestSpecs,
          false, InclNodes, ExclNodes)</c></seealso>.</p>
      </desc>
     </func>

     <func>
       <name>run(TestSpecs, AllowUserTerms, InclNodes, ExclNodes) -&gt; ok</name>
       <fsummary>Tests are spawned on the nodes as specified in TestSpecs.
       </fsummary>
       <type>
         <v>TestSpecs = string() | [SeparateOrMerged]</v>
         <v>SeparateOrMerged = string() | [string()]</v>
         <v>AllowUserTerms = bool()</v>
         <v>InclNodes = [atom()]</v>
         <v>ExclNodes = [atom()]</v>
      </type>
      <desc><marker id="run-4"/>
        <p>Tests are spawned on the nodes as specified in <c>TestSpecs</c>.
          Each specification in <c>TestSpec</c> is handled separately.
          However, it is also possible to specify a list of specifications to
          be merged into one specification before the tests are executed. Any
          test without a particular node specification is also executed on
          the nodes in <c>InclNodes</c>. Nodes in the <c>ExclNodes</c> list
          are excluded from the test.</p>
      </desc>
    </func>

    <func>
      <name>run_on_node(TestSpecs, Node) -&gt; ok</name>
      <fsummary>Equivalent to run_on_node(TestSpecs, false, Node).</fsummary>
      <type>
        <v>TestSpecs = string() | [SeparateOrMerged]</v>
        <v>SeparateOrMerged = string() | [string()]</v>
        <v>Node = atom()</v>
      </type>
      <desc><marker id="run_on_node-2"/>
        <p>Equivalent to
          <seealso marker="#run_on_node-3"><c>ct_master:run_on_node(TestSpecs,
          false, Node)</c></seealso>.</p>
      </desc>
    </func>

    <func>
      <name>run_on_node(TestSpecs, AllowUserTerms, Node) -&gt; ok</name>
      <fsummary>Tests are spawned on Node according to TestSpecs.</fsummary>
      <type>
        <v>TestSpecs = string() | [SeparateOrMerged]</v>
        <v>SeparateOrMerged = string() | [string()]</v>
        <v>AllowUserTerms = bool()</v>
        <v>Node = atom()</v>
      </type>
      <desc><marker id="run_on_node-3"/>
        <p>Tests are spawned on <c>Node</c> according to <c>TestSpecs</c>.</p>
      </desc>
    </func>

    <func>
      <name>run_test(Node, Opts) -&gt; ok</name>
      <fsummary>Tests are spawned on Node using ct:run_test/1.</fsummary>
      <type>
        <v>Node = atom()</v>
        <v>Opts = [OptTuples]</v>
        <v>OptTuples = {config, CfgFiles} | {dir, TestDirs} | {suite, Suites} | {testcase, Cases} | {spec, TestSpecs} | {allow_user_terms, Bool} | {logdir, LogDir} | {event_handler, EventHandlers} | {silent_connections, Conns} | {cover, CoverSpecFile} | {cover_stop, Bool} | {userconfig, UserCfgFiles}</v>
        <v>CfgFiles = string() | [string()]</v>
        <v>TestDirs = string() | [string()]</v>
        <v>Suites = atom() | [atom()]</v>
        <v>Cases = atom() | [atom()]</v>
        <v>TestSpecs = string() | [string()]</v>
        <v>LogDir = string()</v>
        <v>EventHandlers = EH | [EH]</v>
        <v>EH = atom() | {atom(), InitArgs} | {[atom()], InitArgs}</v>
        <v>InitArgs = [term()]</v>
        <v>Conns = all | [atom()]</v>
      </type>
      <desc><marker id="run_test-2"/>
        <p>Tests are spawned on <c>Node</c> using
          <seealso marker="ct:run_test-1"><c>ct:run_test/1</c></seealso></p>
      </desc>
    </func>
  </funcs>

</erlref>