-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsuite.html
More file actions
107 lines (92 loc) · 4.08 KB
/
Copy pathsuite.html
File metadata and controls
107 lines (92 loc) · 4.08 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
<!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>Create and Run a Test Suite</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="Create and Run a Test Suite" />
<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="prefix.html">< Previous Section: Use Non-Default Prefix</a> | <a href="userguide.html">Next Section: User Guide ></a></p>
<!-- Begin utPLSQL Body -->
<!-- $Id$ -->
<h1>Create and Run a Test Suite</h1>
<p>
Usually our applications are composed of multiple packages. To test
our application, we must test all of the packages. utPLSQL makes it easier
for you to do that by offering <a href="defsuite.html">test suites</a>.
</p>
<p>
Here is an example of a script that defines a (partial) test suite for
PL/Vision, a code library available from <a href="http://www.revealnet.com">RevealNet</a>
as part of its Active PL/SQL Knowledge Base:
</p>
<pre>
/*file plvision.tst */
BEGIN
-- Define a test suite for PL/Vision
utsuite.add ('PLVision');
-- Add packages for testing
utpackage.add (
'PLVision', 'PLVstr', dir_in => 'e:\openoracle\utplsql\examples');
utpackage.add (
'PLVision', 'PLVdate', dir_in => 'e:\openoracle\utplsql\examples');
END;
/
</pre>
<p>
This is a very simple test suite definition. I rely on all defaults, but
I specify a location for my test package code. By doing this, utPLSQL will
be able to find my test packages even if the default/current utPLSQL directory
is set to another location.
</p>
<p>
If I want to, I can also specify the order in which packages are tested
by passing a value for the seq_in argument. I can request that the test
code be looked for in the same package as the source code, and so on. Here
is a rewriting of the above sutie creation script that demonstrates these
options:
</p>
<pre>
BEGIN
utsuite.add ('PLVision');
utpackage.add ('PLVision',
'PLVstr',
dir_in => 'e:\openoracle\utplsql\examples',
seq_in => 1,
samepackage_in => TRUE
);
utpackage.add ('PLVision',
'PLVdate',
dir_in => 'e:\openoracle\utplsql\examples',
seq_in => 2,
samepackage_in => TRUE
);
END;
/</pre>
<!-- End utPLSQL Body -->
<p><a href="prefix.html">< Previous Section: Use Non-Default Prefix</a> | <a href="userguide.html">Next Section: User Guide ></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>