Skip to content

Commit 9975eb4

Browse files
committed
Working on WT_RESULT package Unit Testing
1 parent 97022be commit 9975eb4

12 files changed

Lines changed: 428 additions & 51 deletions

src/core/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ Custom Error Codes:
5656
20006 - WT_PROFILER dbms_profiler.START_PROFILER failed
5757
20007 - WT_PROFILER g_rec.test_run_id is null
5858
20008 - WT_PROFILER Regular Expression Failure from NOT_EXECUTABLE
59+
20009 - WT_RESULT "in_test_run_id" cannot be NULL

src/core/install.LST

Lines changed: 161 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -184,28 +184,160 @@ Grant succeeded.
184184
Grant succeeded.
185185

186186

187-
Table WT_DBOUT_PROFILES created.
187+
Error starting at line : 6 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
188+
In command -
189+
create table wt_dbout_profiles
190+
(test_run_id number(38) constraint wt_dbout_profiles_nn1 not null
191+
,line number(6) constraint wt_dbout_profiles_nn2 not null
192+
,status varchar2(4) constraint wt_dbout_profiles_nn3 not null
193+
,total_occur number(9) constraint wt_dbout_profiles_nn4 not null
194+
,total_time number(9) constraint wt_dbout_profiles_nn5 not null
195+
,min_time number(9) constraint wt_dbout_profiles_nn6 not null
196+
,max_time number(9) constraint wt_dbout_profiles_nn7 not null
197+
,text varchar2(4000) constraint wt_dbout_profiles_nn8 not null
198+
,not_exec_text varchar2(4000)
199+
,constraint wt_dbout_profiles_pk primary key (test_run_id, line)
200+
,constraint wt_dbout_profiles_fk1 foreign key (test_run_id)
201+
references wt_test_runs (id)
202+
,constraint wt_dbout_profiles_fk2 foreign key (not_exec_text)
203+
references wt_not_executable (text) disable
204+
,constraint wt_dbout_profiles_ck1 check (status in ('EXEC','NOTX','EXCL','ANNO','UNKN'))
205+
) pctfree 0
206+
Error report -
207+
ORA-02444: Cannot resolve referenced object in referential constraints
208+
02444. 00000 - "Cannot resolve referenced object in referential constraints"
209+
*Cause: attempted to define foreign key referencing an object which
210+
cannot be resolved to a base table reference
211+
*Action: referential constraints can only be defined on objects which
212+
can be resolve to base table reference
213+
214+
Error starting at line : 24 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
215+
In command -
216+
comment on table wt_dbout_profiles is 'PL/SQL Profiler data for Database Object Under Test (DBOUT).'
217+
Error report -
218+
ORA-01775: looping chain of synonyms
219+
01775. 00000 - "looping chain of synonyms"
220+
*Cause:
221+
*Action:
188222

223+
Error starting at line : 25 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
224+
In command -
225+
comment on column wt_dbout_profiles.test_run_id is 'Foreign Key for the Test Run, Primary Key part 1.'
226+
Error report -
227+
ORA-01775: looping chain of synonyms
228+
01775. 00000 - "looping chain of synonyms"
229+
*Cause:
230+
*Action:
189231

190-
Comment created.
232+
Error starting at line : 26 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
233+
In command -
234+
comment on column wt_dbout_profiles.line is 'Source code line number, Primary Key part 2.'
235+
Error report -
236+
ORA-01775: looping chain of synonyms
237+
01775. 00000 - "looping chain of synonyms"
238+
*Cause:
239+
*Action:
191240

241+
Error starting at line : 27 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
242+
In command -
243+
comment on column wt_dbout_profiles.status is 'Executed/NotExecuted/Excluded/Annotated/Unknown Status from the Profiler'
244+
Error report -
245+
ORA-01775: looping chain of synonyms
246+
01775. 00000 - "looping chain of synonyms"
247+
*Cause:
248+
*Action:
192249

193-
Comment created.
250+
Error starting at line : 28 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
251+
In command -
252+
comment on column wt_dbout_profiles.total_occur is 'Number of times this line was executed.'
253+
Error report -
254+
ORA-01775: looping chain of synonyms
255+
01775. 00000 - "looping chain of synonyms"
256+
*Cause:
257+
*Action:
194258

259+
Error starting at line : 29 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
260+
In command -
261+
comment on column wt_dbout_profiles.total_time is 'Total time spent executing this line.'
262+
Error report -
263+
ORA-01775: looping chain of synonyms
264+
01775. 00000 - "looping chain of synonyms"
265+
*Cause:
266+
*Action:
195267

196-
Comment created.
268+
Error starting at line : 30 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
269+
In command -
270+
comment on column wt_dbout_profiles.min_time is 'Minimum execution time for this line.'
271+
Error report -
272+
ORA-01775: looping chain of synonyms
273+
01775. 00000 - "looping chain of synonyms"
274+
*Cause:
275+
*Action:
197276

277+
Error starting at line : 31 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
278+
In command -
279+
comment on column wt_dbout_profiles.max_time is 'Maximum execution time for this line.'
280+
Error report -
281+
ORA-01775: looping chain of synonyms
282+
01775. 00000 - "looping chain of synonyms"
283+
*Cause:
284+
*Action:
198285

199-
Comment created.
286+
Error starting at line : 32 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
287+
In command -
288+
comment on column wt_dbout_profiles.text is 'Source code text for this line number.'
289+
Error report -
290+
ORA-01775: looping chain of synonyms
291+
01775. 00000 - "looping chain of synonyms"
292+
*Cause:
293+
*Action:
200294

295+
Error starting at line : 33 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
296+
In command -
297+
comment on column wt_dbout_profiles.not_exec_text is 'One of the matching values from TEXT.WT_NOT_EXECUTABLE'
298+
Error report -
299+
ORA-01775: looping chain of synonyms
300+
01775. 00000 - "looping chain of synonyms"
301+
*Cause:
302+
*Action:
201303

202-
Comment created.
304+
Error starting at line : 35 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
305+
In command -
306+
grant select on wt_dbout_profiles to public
307+
Error report -
308+
ORA-01775: looping chain of synonyms
309+
01775. 00000 - "looping chain of synonyms"
310+
*Cause:
311+
*Action:
203312

313+
Error starting at line : 36 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
314+
In command -
315+
grant insert on wt_dbout_profiles to public
316+
Error report -
317+
ORA-01775: looping chain of synonyms
318+
01775. 00000 - "looping chain of synonyms"
319+
*Cause:
320+
*Action:
204321

205-
Comment created.
322+
Error starting at line : 37 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
323+
In command -
324+
grant update on wt_dbout_profiles to public
325+
Error report -
326+
ORA-01775: looping chain of synonyms
327+
01775. 00000 - "looping chain of synonyms"
328+
*Cause:
329+
*Action:
206330

331+
Error starting at line : 38 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
332+
In command -
333+
grant delete on wt_dbout_profiles to public
334+
Error report -
335+
ORA-01775: looping chain of synonyms
336+
01775. 00000 - "looping chain of synonyms"
337+
*Cause:
338+
*Action:
207339

208-
Comment created.
340+
Table WT_NOT_EXECUTABLE created.
209341

210342

211343
Comment created.
@@ -220,16 +352,16 @@ Comment created.
220352
Grant succeeded.
221353

222354

223-
Grant succeeded.
355+
1 row inserted.
224356

225357

226-
Grant succeeded.
358+
Table WT_TEST_DATA created.
227359

228360

229-
Grant succeeded.
361+
Comment created.
230362

231363

232-
Table WT_NOT_EXECUTABLE created.
364+
Comment created.
233365

234366

235367
Comment created.
@@ -241,9 +373,24 @@ Comment created.
241373
Comment created.
242374

243375

376+
Comment created.
377+
378+
379+
Grant succeeded.
380+
381+
244382
Grant succeeded.
245383

246384

385+
Grant succeeded.
386+
387+
388+
PL/SQL procedure successfully completed.
389+
390+
391+
Commit complete.
392+
393+
247394
Package WTPLSQL compiled
248395

249396

@@ -282,10 +429,11 @@ Package Body WT_RESULT compiled
282429

283430
Package Body WT_ASSERT compiled
284431

285-
Errors: check compiler log
286432

287433
Package Body WT_PROFILER compiled
288434

435+
Errors: check compiler log
289436

290437
Package Body WT_TEXT_REPORT compiled
291438

439+
Errors: check compiler log

src/core/install.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ grant select, insert, delete on plsql_profiler_data to public;
3838
-- Core Tables
3939
@wt_test_runs.tab
4040
@wt_results.tab
41-
@wt_dbout_profiles.tab
4241
@wt_not_executable.tab
42+
@wt_dbout_profiles.tab
4343
@wt_test_data.tab
4444

4545
-- Package Specifications

src/core/scratch.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,15 @@ declare
5454
wtplsql.test_run(in_package_name);
5555
wt_text_report.dbms_out(in_runner_name => in_package_name
5656
-- ,in_hide_details => TRUE
57-
,in_summary_first => TRUE
57+
-- ,in_summary_last => TRUE
5858
,in_show_pass => TRUE
5959
-- ,in_show_aux => TRUE
6060
);
6161
end run_test;
6262
begin
6363
--run_test('WTPLSQL');
64-
run_test('WT_ASSERT');
64+
--run_test('WT_ASSERT');
65+
run_test('WT_RESULT');
6566
end;
6667
/
6768

0 commit comments

Comments
 (0)