Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 30d27fe

Browse files
committed
Adding global setup
1 parent 1642f47 commit 30d27fe

7 files changed

Lines changed: 33 additions & 3 deletions

File tree

test/install_and_run_tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ time utPLSQL-cli/bin/utplsql run ${UT3_TESTER_HELPER}/${UT3_TESTER_HELPER_PASSWO
2727
-f=ut_junit_reporter -o=junit_test_results.xml \
2828
-f=ut_tfs_junit_reporter -o=tfs_test_results.xml \
2929
-f=ut_documentation_reporter -o=test_results.log -s \
30-
-scc
30+
-scc \
31+
-q

test/install_ut3_user_tests.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ whenever oserror exit failure rollback
55
alter session set plsql_optimize_level=0;
66

77
prompt Install user tests
8+
@@ut3_user/test_user.pks
89
@@ut3_user/expectations/unary/test_expect_not_to_be_null.pks
910
@@ut3_user/expectations/unary/test_expect_to_be_null.pks
1011
@@ut3_user/expectations/unary/test_expect_to_be_empty.pks
@@ -42,7 +43,7 @@ set define on
4243
@@install_below_12_2.sql 'ut3_user/reporters/test_coverage/test_html_proftab_reporter.pks'
4344
set define off
4445

45-
46+
@@ut3_user/test_user.pkb
4647
@@ut3_user/expectations/unary/test_expect_not_to_be_null.pkb
4748
@@ut3_user/expectations/unary/test_expect_to_be_null.pkb
4849
@@ut3_user/expectations/unary/test_expect_to_be_empty.pkb

test/ut3_tester/core.pkb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ create or replace package body core is
55
ut3.ut_coverage.set_develop_mode(true);
66
--improve performance of test execution by disabling all compiler optimizations
77
ut3_tester_helper.main_helper.execute_autonomous('ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL=0');
8-
dbms_output.enable(null);
8+
--dbms_output.enable(null);
99
end;
1010

1111
end;

test/ut3_tester_helper/main_helper.pkb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,9 @@ create or replace package body main_helper is
154154
ut3.ut_utils.append_to_list(a_list,a_items);
155155
end;
156156

157+
procedure output_null is
158+
begin
159+
dbms_output.enable(null);
160+
end;
157161
end;
158162
/

test/ut3_tester_helper/main_helper.pks

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,7 @@ create or replace package main_helper is
4545

4646
procedure append_to_list(a_list in out nocopy ut3.ut_varchar2_rows, a_items ut3.ut_varchar2_rows);
4747

48+
procedure output_null;
49+
4850
end;
4951
/

test/ut3_user/test_user.pkb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
create or replace package body test_user is
2+
3+
procedure global_setup is
4+
begin
5+
ut3.ut_coverage.set_develop_mode(true);
6+
--improve performance of test execution by disabling all compiler optimizations
7+
ut3_tester_helper.main_helper.execute_autonomous('ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL=0');
8+
--dbms_output.enable(null);
9+
end;
10+
11+
end;
12+
/

test/ut3_user/test_user.pks

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
create or replace package test_user is
2+
3+
--%suite
4+
--%suitepath(utplsql)
5+
6+
--%beforeall
7+
procedure global_setup;
8+
9+
end;
10+
/

0 commit comments

Comments
 (0)