-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest.sql
More file actions
80 lines (60 loc) · 1.88 KB
/
test.sql
File metadata and controls
80 lines (60 loc) · 1.88 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
set trimspool on
set serveroutput on size unlimited
set linesize 4000
set pages 0
set feedback off
set verify off
set echo off
clear screen
prompt .. Creating test fixture procedure FIX_PARSER_CASE
@test/fixture/fix_parser_case.prc
prompt .. Creating test fixture procedure FIX_PARSER_DECL_WITH_INIT
@test/fixture/fix_parser_decl_with_init.prc
prompt .. Creating test fixture procedure FIX_PARSER_DECL_WITHOUT_INIT
@test/fixture/fix_parser_decl_without_init.prc
prompt .. Creating test fixture procedure FIX_PARSER_FNCANDPROC
@test/fixture/fix_parser_fncandproc.sql
prompt .. Creating test fixture procedure FIX_PARSER_IF
@test/fixture/fix_parser_if.prc
prompt .. Creating package UT_PLPARSE_AST
@test/implemtation/type/ut_plparse_ast.pkg
prompt .. Creating package UT_PLPARSE_TOKEN_STREAM
@test/implemtation/package/ut_plparse_token_stream.pkg
prompt .. Creating package UT_PLPARSE_PARSER
@test/implemtation/package/ut_plparse_parser.pkg
prompt .. Creating package UT_PLPARSE_AST_REGISTRY
@test/implemtation/package/ut_plparse_ast_registry.pkg
define utplsql_user=ceos_utplsql
prompt granting execute on test packages to &&utplsql_user user
begin
for ii in (select *
from user_objects
where object_name like 'TEST%'
and object_type = 'PACKAGE') loop
execute immediate 'grant execute on ' || ii.object_name || ' to &&utplsql_user';
end loop;
end;
/
prompt done
prompt .. Resetting packages
exec dbms_session.reset_package;
prompt .. Re-enabling DBMS_OUTPUT
exec dbms_output.enable;
set termout on
set serveroutput on size unlimited
prompt utPLSQL test reported as JUnit
spool report/test-report-core.xml
begin
ut.run(ut_junit_reporter());
end;
/
spool off
prompt done
prompt Code Coverage Report
spool report/coverage-report-core.html
begin
ut.run(ut_coverage_html_reporter());
end;
/
spool off
select * from table(ut.run());