-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathen-xtmunit.html
More file actions
executable file
·291 lines (284 loc) · 11.4 KB
/
en-xtmunit.html
File metadata and controls
executable file
·291 lines (284 loc) · 11.4 KB
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<HTML>
<HEAD>
<!--VA Office of Information and Technology (OIT)-->
<!--Oakland OIFO-->
<!-- START: META DATA -->
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="language"
content="en">
<meta name="creator"
content="Department of Veterans Affairs (VA), Office of Information and Technology (OIT), VistA Infrastructure (VI)">
<meta name="subject"
content="Kernel Toolkit APIs: EN^XTMUNIT">
<meta name="keywords"
content="VistA Infrastructure,VI,Infrastructure,Infrastructure and Security Services,Information Infrastructure Service,OIT,OI&T,ISS,IIS,VISTA,kernel,toolkit,programmer,developer,programmer manual,developer's guide,apis,application programming interface,application,programming,interface,entry point,EN^XTMUNIT,EN,XTMUNIT,M Unit Utility,Not callable from outside a unit test">
<meta name="description"
content="Kernel Toolkit APIs: EN^XTMUNIT">
<meta name="datecreated"
content="20010101">
<meta name="datereviewed"
content="20180820">
<meta name="type"
content="Homepage">
<!-- END: META DATA -->
<title>Kernel Toolkit APIs: EN^XTMUNIT</title>
<LINK REL="StyleSheet"
TYPE="text/css"
HREF="common/developer.css">
</HEAD>
<BODY>
<header>
<!--Start Title Banner (image)-->
<TABLE BORDER="0"
WIDTH="100%"
CELLSPACING="3"
CELLPADDING="3"
SUMMARY="This table is for formatting purposes only">
<TR>
<TD VALIGN="top"
ALIGN="left">
<IMG SRC="images/toolkit_heading_APIs.gif"
ALT="Kernel Toolkit 7.3 APIs Banner"
BORDER="0">
<BR>
<IMG SRC="images/oitbanner.gif"
ALT="Office of Information and Technology (OIT) Banner"
BORDER="0">
</TD>
</TR>
</TABLE>
<A HREF="#navskip">
<IMG SRC="images/clr_pxl.gif"
ALT="[skip navigation]"
WIDTH="25"
HEIGHT="1"
BORDER="0"></A>
<!--End Title Banner (image)-->
</header>
<!-- Start Content -->
<H3><A NAME="navskip">EN^XTMUNIT</A>(): Run Unit Tests</H3>
<P><B>Reference Type:</B> N/A; Not callable from outside a unit test, <B>Category:</B> Toolkit—M Unit Utility,
<B>ICR#:</B> N/A</P>
<H4><A NAME="description">Description</A></H4>
<P>The EN^XTMUNIT API runs unit tests. It is typically the first command within a suite of unit test routines, so that the entire suite of tests (multiple routines) can be run by executing the first routine of the suite. For example, the unit tests for testing M Unit can be run by:</P>
<pre> ><strong>D ^XTMZZUT1”</strong></pre>
<p>The EN^XTMUNIT API starts the unit testing process.</p>
<p><b>NOTE:</b> None of the M Unit Utility Application Programming Interfaces (APIs), extrinsic functions, or sections of code in the M Unit are callable from outside a unit test, but are all part of a unit test. M UNIT is a self-contained application.</p>
<p><b>REF:</b> For an overview and more details of the M Unit Utility, see the
"Toolkit—M Unit Utility" section in the <i>Kernel 8.0 & Kernel Toolkit 7.3 Developer's Guide</i>.</p>
<H4><A NAME="format">Format</A></H4>
<PRE> D EN^XTMUNIT(rouname,[verbose,][break])</PRE>
<H4><A NAME="input_parameters">Input Parameters</A></H4>
<TABLE BORDER="1"
CELLPADDING="5"
BGCOLOR="#F1F2F3"
BORDERCOLORLIGHT="#F1F2F3"
BORDERCOLORDARK="#808080"
WIDTH="100%">
<TR>
<TD VALIGN="TOP"
WIDTH="15%">
<B>rouname:</B>
</TD>
<TD VALIGN="TOP"
WIDTH="85%">
<P>(required) provides the name of the routine where the testing should be started. That routine
<em>must</em> have at least one test entry point (and possibly more) either specified as follows:</P>
<ul>
<li>
In the lines immediately following the <strong>XTENT</strong> tag as the third semi-colon piece on the line.
<br>
<br>
Or:
<br>
<br>
</li>
<li>
IIt can have tags with <strong>@TEST</strong> as the first text of the comment for the tag line.
</li>
</ul>
</TD>
</TR>
<TR>
<TD VALIGN="TOP"
WIDTH="15%">
<B>verbose:</B>
</TD>
<TD VALIGN="TOP"
WIDTH="85%">
<P>(optional) If it evaluates to <b>True</b> (e.g., <strong>1</strong>), it turns on verbose mode, which lists each individual test being run as well as its result.</P>
</TD>
</TR>
<TR>
<TD VALIGN="TOP"
WIDTH="15%">
<B>break:</B>
</TD>
<TD VALIGN="TOP"
WIDTH="85%">
<P>(optional) If it evaluates to <b>True</b>, it causes the M Unit test process to terminate upon a failure or error instead of continuing until all tests have been evaluated.</P>
</TD>
</TR>
</TABLE>
<H4><A NAME="output">Output</A></H4>
<TABLE BORDER="1"
CELLPADDING="5"
BGCOLOR="#F1F2F3"
BORDERCOLORLIGHT="#F1F2F3"
BORDERCOLORDARK="#808080"
WIDTH="100%">
<TR>
<TD VALIGN="TOP"
WIDTH="15%">
<B>returns:</B>
</TD>
<TD VALIGN="TOP"
WIDTH="85%">
<P>Results of the unit tests.</P>
</TD>
</TR>
</TABLE>
<P>TThe following sections of code in the XTMUNIT routine are additional test entry points added by the developer; however, they are
<em>not</em> callable by the developer from inside or outside of the routine:</P>
<ul>
<li>
<a href="#STARTUP"
title="Link to the 'STARTUP' section"
class="bodylink">STARTUP</a>
<br>
<br>
</li>
<li>
<a href="#SHUTDOWN"
title="Link to the 'SHUTDOWN' section"
class="bodylink">SHUTDOWN</a>
<br>
<br>
</li>
<li>
<a href="#SETUP"
title="Link to the 'SETUP' section"
class="bodylink">SETUP</a>
<br>
<br>
</li>
<li>
<a href="#TEARDOWN"
title="Link to the 'TEARDOWN' section"
class="bodylink">TEARDOWN</a>
<br>
<br>
</li>
<li>
<a href="#XTENT"
title="Link to the 'XTENT: List Unit Test Entry Points' section"
class="bodylink">XTENT: List Unit Test Entry Points</a>
<br>
<br>
</li>
<li>
<a href="#XTROU"
title="Link to the 'XTROU: List of Routines Containing Additional Tests' section"
class="bodylink">XTROU: List of Routines Containing Additional Tests</a>
</li>
</ul>
<h5><a name="STARTUP">STARTUP</a></h5>
<p>This section of code in the XTMUNIT routine runs before anything else. It is useful for setting up an environment or variable values that are common to all of the tests.</p>
<h5><a name="SHUTDOWN">SHUTDOWN</a></h5>
<p>This section of code in the XTMUNIT routine runs after everything else. It is useful for shutting down an environment or clearing variable values that are common to all of the tests. It can also be used for cleaning up global or file entries that are left as a result of testing.</p>
<h5><a name="SETUP">SETUP</a></h5>
<p>This section of code in the XTMUNIT routine runs before every test. It is useful for resetting an environment or variable values that are used by the tests.</p>
<h5><a name="TEARDOWN">TEARDOWN</a></h5>
<p>This section of code in the XTMUNIT routine runs after every test. It is useful for cleaning up an environment or variable values that are used by the tests.</p>
<h5><a name="XTENT">XTENT: List Unit Test Entry Points</a></h5>
<p>This section of code in the XTMUNIT routine is used to store information required by the EN^XTMUNIT API to run a unit test. It provides a list of unit test entry points. Each entry describes a group of tests.</p>
<table width="100%"
border="1"
cellspacing="3"
cellpadding="3">
<tr>
<td>
<pre> ;;T4;Entry point using XTMENT
;;T5;Error count check</pre>
</td>
</tr>
</table>
<h5><a name="XTROU">XTROU: List of Routines Containing Additional Tests</a></h5>
<table width="100%"
border="1"
cellspacing="3"
cellpadding="3">
<tr>
<td>
<pre> ;;XTMZZUT2;
;;XTMZZUT3;</pre>
</td>
</tr>
</table>
<p>This section of code in the XTMUNIT routine is used to store information required by the EN^XTMUNIT API to run a unit test. It provides a list of routines containing additional tests. It extends a suite of tests beyond the limits of a single routine.</p>
<p> </p>
<!-- End Content -->
<footer>
<HR COLOR="003399">
<TABLE WIDTH="100%"
SUMMARY="This table for layout purposes only"
CLASS="white">
<TR>
<TD ALIGN="CENTER"
VALIGN="TOP">
<!--Start Bottom Links-->
<P ALIGN="CENTER">
<A HREF="http://www.va.gov/"
CLASS="bodylink"
TARGET="_top"
TITLE="Department of Veterans Affairs Internet Home Page">
<ACRONYM TITLE="Department of Veterans Affairs">VA</ACRONYM> (Internet)</A> /
<A HREF="http://vaww.va.gov/"
CLASS="bodylink"
TARGET="_top"
TITLE="Department of Veterans Affairs Intranet Home Page">
<ACRONYM TITLE="Department of Veterans Affairs">VA</ACRONYM>(Intranet)</A> /
<A HREF="http://vaww.va.gov/vhaoi/"
CLASS="bodylink"
TARGET="_top"
TITLE="Office of Information Home Page">
<ACRONYM TITLE="Veterans Health Adminstration Office of Health Information (OHI)">VHA OHI</ACRONYM></A> /
<A HREF="https://vaww.oit.va.gov/"
CLASS="bodylink"
TARGET="_top"
TITLE="Office of Information and Technology Home Page">
<ACRONYM TITLE="Office of Information and Technology (OIT)">OIT</ACRONYM></A> /
<A HREF="http://vista.med.va.gov/"
CLASS="bodylink"
TARGET="_top"
TITLE="Product Development (PD) Home Page">
<ACRONYM TITLE="Product Development">PD</ACRONYM></A> /
<A HREF="http://vista.med.va.gov/termsofuse.htm"
CLASS="bodylink"
TARGET="_top"
TITLE="Product Development (PD) Terms of Use Page">Terms of Use</A> /
<A HREF="http://www.va.gov/privacy/"
CLASS="bodylink"
TARGET="_top"
TITLE="Department of Veterans Affairs Privacy Policy">VA Privacy Policy</A> /
<A HREF="http://www1.va.gov/accessible/"
CLASS="bodylink"
TARGET="_top"
TITLE="Department of Veterans Affairs Internet Accessibility">Accessibility</A></P>
<!--End Bottom Links-->
<!--Date content was reviewed or updated-->
<P ALIGN="CENTER">Reviewed/Updated: 08/30/2018
<BR>
<BR>
For questions, comments, or accessibility issues with this website, please contact us by E-Mail:
<A HREF="mailto:VHAISFCVTECH@med.va.gov?subject=Web page comments from: /apis/en-xtmunit.html"
TITLE="Send mail to the Webmasters regarding this page"
class="bodylink">Webmasters</A></P>
<P> </P>
</TD>
</TR>
</TABLE>
</footer>
</BODY>
</HTML>