-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutPLSQL-V2-Comparison.htm
More file actions
104 lines (102 loc) · 5.43 KB
/
Copy pathutPLSQL-V2-Comparison.htm
File metadata and controls
104 lines (102 loc) · 5.43 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
<p><a href="README.htm">Website Home Page</a></p>
<h1 id="utplsql-v2-comparison">utPLSQL V2 Comparison</h1>
<hr />
<p>This comparison assumes a familiarity with utPLSQL V1/V2. The differences between wtPLSQL and utPLSQL V2 will be the focus.</p>
<h3 id="test-transience">Test Transience</h3>
<p>utPLSQL V2 included a focus on test transience by requiring "setup" and "tear down" procedures in a test package. wtPLSQL has no requirement. wtPLSQL also does not prevent any setup or tear down procedures from a test runner package.</p>
<h3 id="non-sequenced-testing">Non-Sequenced Testing</h3>
<p>utPLSQL V2 did not include any specific order of test procedures in a test package. By default, wtPLSQL orders the test procedures because these test procedures will be listed in sequence in the test runner package. (Everything in the test runner package must be called by the "WTPLSQL_RUN" procedure.)</p>
<h3 id="utl_file-setup">UTL_FILE Setup</h3>
<p>Much of the utPLSQL V2 functionality was centered on the UTL_FILE package. UTL_FILE was used to</p>
<ul>
<li>create empty/skeleton test packages</li>
<li>save reports in various formats</li>
<li>read source code to recompile/refresh database packages</li>
<li>compare files</li>
</ul>
<p>The configuration of UTL_FILE was one of the difficult parts of installing utPLSQL V2. Removing UTL_FILE from wtPLSQL core allows for a much simpler installation. Also, much of the functionality performed by UTL_FILE can be done easier with modern reporting and development tools. Comparing Files</p>
<h3 id="record-comparison">Record Comparison</h3>
<p>In utPLSQL V2, the "utRecEq" package is used to to generate functions to compare record types. To avoid problems, this functionality has not been included in the wtPSQL core. Generating the functions needed to make the comparison require special database permissions. Separating this package into a separate add-on allows these special database permissions to be addressed only if needed.</p>
<h3 id="test-procedure-prefixes">Test Procedure Prefixes</h3>
<p>From the utPLSQL V2 documentation: "The unit test prefix is very important in utPLSQL; the utility uses the prefix to associate source code to be tested with the test package. The prefix also allows utPLSQL to automatically identify the programs within a test package that are to be executed as unit tests."</p>
<p>In wtPLSQL, these prefixes are not required. The lack of these prefixes greatly simplifies the setup of test runners. However, the prefixes can be used with wtPLSQL by building them into test runner packages.</p>
<h3 id="utplsql-trace">utPLSQL Trace</h3>
<p>utPLSQL V2 has a trace facility that can be turned on and off. Because the test runner in wtPLSQL is in control of testing and because the test runner is user written, any desired tracing can be added to the test runner.</p>
<h3 id="utconfig">utConfig</h3>
<p>The utConfig package is no longer used in wtPLSQL. There are 29 settings in the utConfig package in utPLSQL V2. The only remaining settings are in the following packages.</p>
<table>
<thead>
<tr class="header">
<th>WT_ASSERT Setting</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>g_testcase</td>
<td>Name of the current test case</td>
</tr>
<tr class="even">
<td>set_NLS_DATE_FORMAT</td>
<td>Default format for date data type</td>
</tr>
<tr class="odd">
<td>set_NLS_TIMESTAMP_FORMAT</td>
<td>Default format for timestamp data type</td>
</tr>
<tr class="even">
<td>set_NLS_TIMESTAMP_TZ_FORMAT</td>
<td>Default format for timestamp with time zone data type</td>
</tr>
</tbody>
</table>
<br>
<table>
<thead>
<tr class="header">
<th>WT_CORE_REPORT Setting</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>g_single_line_output</td>
<td>Remove/replace new line characters in test result output</td>
</tr>
<tr class="even">
<td>g_date_format</td>
<td>Default format for date data type</td>
</tr>
</tbody>
</table>
<br>
<table>
<thead>
<tr class="header">
<th>WT_PERSIST_REPORT Setting</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>g_single_line_output</td>
<td>Remove/replace new line characters in test result output</td>
</tr>
<tr class="even">
<td>g_date_format</td>
<td>Default format for date data type</td>
</tr>
</tbody>
</table>
<h3 id="utoutput">utOutput</h3>
<p>utOutput in utPLSQL V2 has been replaced by WT_CORE_REPORT and WT_PERSIST_REPORT in wtPLSQL. Like utPLSQL V2, wtPLSQL Core calls WT_CORE_REPORT (using a hook) after each Test Runner is complete. Unlike utPLSQL V2, neither WT_CORE_REPORT or WT_PERSIST_REPORT are called automatically after the Persist add-on is installed. However, the WT_CORE_REPORT hook can be recreated to restore this functionality.</p>
<p>WT_TEXT_REPORT is used to format the results of an ad-hoc assertion that is not part of a Test Runner call tree (call graph). The results of ad-hoc assertions are always sent to DBMS_OUTPUT.</p>
<h3 id="custom-reporter">Custom Reporter</h3>
<p>wtPLSQL has no custom reporter. An alternative to the WT_CORE_REPORTer or the WT_PERSIST_REPORTer is a user written PL/SQL program. If the Persist add-on is installed, all test results are available in database tables. Reporting tools can be used to create custom reports from database tables.</p>
<h3 id="links">Links</h3>
<ul>
<li><a href="https://utplsql.org/moving/2016/07/07/version-2-3-1-released.html">utPLSQL V2.3.1 Website</a></li>
<li><a href="https://utplsql.org/utPLSQL/v2.3.1/">utPLSQL V2.3.1 Documentation</a></li>
</ul>
<hr />
<p><a href="README.htm">Website Home Page</a></p>