-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdefsuite.html
More file actions
138 lines (109 loc) · 4.48 KB
/
Copy pathdefsuite.html
File metadata and controls
138 lines (109 loc) · 4.48 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- WARNING! This file is generated. -->
<!-- To alter documentation, edit files in src directory -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Defining Test Suites</title>
<link rel="stylesheet" href="utplsql.css" type="text/css" />
<meta name="keywords" content="utPLSQL, PL\SQL, Unit Testing, Framework, Oracle" />
<meta name="description" content="Unit Testing PL\SQL" />
<meta name="title" content="Defining Test Suites" />
<meta name="author" content="Steven Feuerstein, Chris Rimmer, Patrick Barel and the utPLSQL Project" />
<meta name="copyright" content="(C) 2000-2005, 2014-2016 Steven Feuerstein, Chris Rimmer, Patrick Barel and the utPLSQL Project" />
</head>
<body>
<div class="purple_bar"><a href="index.html"><img src="utplsql.jpg" alt="utPLSQL logo" /></a></div>
<p>[ <a href="index.html">Home</a>
| <a href="started.html">Getting Started</a>
| <a href="buildpack.html">Build Test Packages</a>
| <a href="examples.html">Examples</a>
| <a href="userguide.html">User Guide</a>
| <a href="release.html">Release Notes</a>
| <a href="map.html">Document Map</a> ]</p>
<p><a href="utreceq.html">< Previous Section: utRecEq Package</a> | <a href="reporter.html">Next Section: Custom Reporter Packages ></a></p>
<!-- Begin utPLSQL Body -->
<!-- $Id$ -->
<h1>Defining Test Suites</h1>
<p>
If you define test suites and register packages
within those suites, then utPLSQL will run an unlimited number of
tests with a single command.
</p>
<h3>Note</h3>
<ul>
<li>
All suite names are stored in upper case.
</li>
<li>
If you do not specify a directory (dir_in),
you will need to call utConfig.setdir if you want automatic compilation
of your packages to occur.
</li>
<li>
If you supply a value for seq_in, packages
will be compiled and tested in ascending numeric sequence order.
</li>
<li>
When you call utSuite.rem, it will remove all
packages for that suite by calling utPackage.rem.
</li>
</ul>
<h2>utSuite - Define Test Suites</h2>
<p>To create and remove test suites, call these programs:</p>
<pre>
PROCEDURE utSuite.add (
name_in IN VARCHAR2,
desc_in IN VARCHAR2 := NULL,
rem_if_exists_in IN BOOLEAN := TRUE
);
PROCEDURE utSuite.rem (name_in IN VARCHAR2);
</pre>
<p>
These programs manipulate the contents of the ut_suite
table. See the tables.sql file for the DDL creating this table.
</p>
<h2>utPackage - Define Test Packages for a Suite</h2>
<p>To register a package in a suite, call the following:</p>
<pre>
PROCEDURE utPackage.add (
suite_in IN VARCHAR2,
package_in IN VARCHAR2,
samepackage_in IN BOOLEAN := FALSE,
prefix_in IN VARCHAR2 := NULL,
dir_in IN VARCHAR2 := NULL,
seq_in IN PLS_INTEGER := NULL,
owner_in IN VARCHAR2 := NULL,
add_tests_in IN BOOLEAN := FALSE,
test_overloads_in IN BOOLEAN := FALSE
);
</pre>
<p>
This manipulates the contents of the ut_package
table. See the tables.sql file for the DDL creating this table.
</p>
<p>
Here is a sample script that defines a very small
portion of the PL/Vision test suite:
</p>
<pre>
BEGIN
utSuite.add ('PLVision');
utPackage.add('PLVision', 'PLVstr', dir_in => 'e:\utplsql\test');
utPackage.add ('PLVision', 'PLVdate', dir_in => 'e:\utplsql\test'');
utPLSQL.testsuite ('PLVision', recompile_in => TRUE);
END;
/
</pre>
<!-- End utPLSQL Body -->
<p><a href="utreceq.html">< Previous Section: utRecEq Package</a> | <a href="reporter.html">Next Section: Custom Reporter Packages ></a></p>
<div class="purple_bar"><a href="index.html"><img src="utplsql.jpg" alt="utPLSQL logo" /></a></div>
<p>
<a href="http://validator.w3.org/check?uri=referer">
<img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" />
</a>
</p>
<p class="copyright">Copyright © 2000-2005, 2014-2016 <a href="mailto:steven@stevenfeuerstein.com">Steven Feuerstein</a>, <a href="mailto:c@24.org.uk">Chris Rimmer</a>, <a href="mailto:pbarel@vda.nl">Patrick Barel</a> and the utPLSQL Project. All rights reserved</p>
</body>
</html>