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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
133ecae
Adding new API user.
lwasylow Mar 22, 2019
9db8f4b
Separating tests.
lwasylow Mar 23, 2019
13f772a
Merge branch 'develop' of github.com:utPLSQL/utPLSQL into feature/int…
lwasylow Mar 24, 2019
c56943e
Update properties
lwasylow Mar 24, 2019
5afba10
Change user that executes tests as helper that is super user.
lwasylow Mar 24, 2019
7cd92e7
Adding next set of tests migrated.
lwasylow Mar 24, 2019
e2561bc
Adding next set of tests migrated.
lwasylow Mar 25, 2019
887e46a
Fixing test package
lwasylow Mar 25, 2019
28dbd1e
Added set of tests:
lwasylow Mar 25, 2019
d7eb125
Adding set of tests :
lwasylow Mar 25, 2019
99e1099
Adding schema prefix to failing tests from 12.1
lwasylow Mar 25, 2019
04cd36c
Fixing development scripts
lwasylow Mar 25, 2019
3e98723
Fixed bug for deployments with uninstall included.
jgebal Mar 25, 2019
ba83f8f
Merge branch 'feature/introduce_testing_with_accurate_grants' of gith…
lwasylow Mar 26, 2019
0bf1d9e
FIX : removal of non existing types from uninstall script
lwasylow Mar 26, 2019
e914d96
INSTALL:Is it too many monkeys ?:)
lwasylow Mar 26, 2019
174dcbc
Adding set of tests:
lwasylow Mar 26, 2019
0c05daf
Adding set of tests:
lwasylow Mar 26, 2019
80783c3
Adding set of tests:
lwasylow Mar 28, 2019
c4b08af
Adding set of tests:
lwasylow Mar 28, 2019
0618616
Adding set of tests:
lwasylow Mar 28, 2019
29295b7
Adding set of tests:
lwasylow Mar 29, 2019
30b0cfe
Adding set of tests:
lwasylow Mar 29, 2019
3cc34ea
Adding tests
lwasylow Mar 29, 2019
a6a848d
Adding tests:
lwasylow Mar 30, 2019
858372c
Adding set of tests:
lwasylow Mar 31, 2019
620fd61
Adding extra tests:
lwasylow Mar 31, 2019
e6b0673
Merge branch 'develop' of github.com:utPLSQL/utPLSQL into feature/int…
lwasylow Mar 31, 2019
c508e79
Adding tests:
lwasylow Apr 1, 2019
858a675
Fixing broken test.
lwasylow Apr 1, 2019
1642f47
Adding test:
lwasylow Apr 1, 2019
30d27fe
Adding global setup
lwasylow Apr 1, 2019
3b07c6a
Merge branch 'develop' of github.com:utPLSQL/utPLSQL into feature/int…
lwasylow Apr 2, 2019
a8dfa14
Merge branch 'develop' of github.com:utPLSQL/utPLSQL into feature/int…
lwasylow Apr 2, 2019
5d3b18c
Update cleanup script after branching from random order branch
lwasylow Apr 2, 2019
b56d27a
Fixed invalid suitepath in `core` package.
jgebal Apr 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixed invalid suitepath in core package.
Updated cli version to 3.1.6
Added top package `utplsql` with dbms_output.enable for both test users.
Renamed suitepath to match username (ut3_tester)
  • Loading branch information
jgebal committed Apr 3, 2019
commit b56d27adfcd2ecae307665727a35c3ee9ef41171
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ env:
#utPLSQL released version directory
- UTPLSQL_DIR="utPLSQL_latest_release"
- SELFTESTING_BRANCH=${TRAVIS_BRANCH}
- UTPLSQL_CLI_VERSION="3.1.0"
- UTPLSQL_CLI_VERSION="3.1.6"
# Maven
- MAVEN_HOME=/usr/local/maven
- MAVEN_CFG=$HOME/.m2
Expand Down
2 changes: 1 addition & 1 deletion development/template.env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export SQLCLI=sql # For sqlcl client
#export SQLCLI=sqlplus # For sqlplus client
export CONNECTION_STR=127.0.0.1:1521/xe # Adjust the connect string
export ORACLE_PWD=oracle # Adjust your local SYS password
export UTPLSQL_CLI_VERSION="3.1.0"
export UTPLSQL_CLI_VERSION="3.1.6"
export SELFTESTING_BRANCH=develop

export UTPLSQL_DIR="utPLSQL_latest_release"
Expand Down
11 changes: 11 additions & 0 deletions test/common_helper/utplsql.pkb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
create or replace package body utplsql is

procedure global_setup is
begin
--we need to have dbms_output enable for our tests
--TODO - move this to utPLSQL-cli once cli has support for it.
dbms_output.enable(null);
end;

end;
/
9 changes: 9 additions & 0 deletions test/common_helper/utplsql.pks
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
create or replace package utplsql is

--%suite

--%beforeall
procedure global_setup;

end;
/
3 changes: 1 addition & 2 deletions test/install_and_run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ time utPLSQL-cli/bin/utplsql run ${UT3_TESTER_HELPER}/${UT3_TESTER_HELPER_PASSWO
-f=ut_sonar_test_reporter -o=test_results.xml \
-f=ut_junit_reporter -o=junit_test_results.xml \
-f=ut_tfs_junit_reporter -o=tfs_test_results.xml \
-f=ut_documentation_reporter -o=test_results.log -s \
-scc
-f=ut_documentation_reporter -o=test_results.log -s
2 changes: 2 additions & 0 deletions test/install_ut3_tester_tests.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ whenever oserror exit failure rollback

alter session set plsql_optimize_level=0;

@@common_helper/utplsql.pks
@@common_helper/utplsql.pkb

--Install tests
@@ut3_tester/core.pks
Expand Down
3 changes: 3 additions & 0 deletions test/install_ut3_user_tests.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ whenever oserror exit failure rollback

alter session set plsql_optimize_level=0;

@@common_helper/utplsql.pks
@@common_helper/utplsql.pkb

prompt Install user tests
@@ut3_user/test_user.pks
@@ut3_user/expectations/unary/test_expect_not_to_be_null.pks
Expand Down
6 changes: 1 addition & 5 deletions test/ut3_tester/core.pkb
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
create or replace package body core is

procedure global_setup is
procedure global_setup is
begin
ut3.ut_coverage.set_develop_mode(true);
--improve performance of test execution by disabling all compiler optimizations
ut3_tester_helper.main_helper.execute_autonomous('ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL=0');
dbms_output.enable(null);

--trn on helper output
ut3_tester_helper.main_helper.output_null;
end;

end;
Expand Down
2 changes: 1 addition & 1 deletion test/ut3_tester/core.pks
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package core is

--%suite
--%suitepath(utplsql)
--%suitepath(utplsql.ut3_tester)

--%beforeall
procedure global_setup;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package test_annot_throws_exception
is
--%suite(annotations - throws)
--%suitepath(utplsql.framework_tester.core.annotations)
--%suitepath(utplsql.ut3_tester.core.annotations)

--%beforeall
procedure recollect_tests_results;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package test_annotation_manager is

--%suite(ut_annotation_manager)
--%suitepath(utplsql.framework_tester.core.annotations)
--%suitepath(utplsql.ut3_tester.core.annotations)

--%aftereach
procedure cleanup_annotation_cache;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package test_annotation_parser is

--%suite(ut_annotation_parser)
--%suitepath(utplsql.framework_tester.core.annotations)
--%suitepath(utplsql.ut3_tester.core.annotations)

--%test(Treats procedure level annotations as package level, if mixed with comments)
procedure test_proc_comments;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package test_before_after_annotations is

--%suite(annotations - beforetest and aftertest)
--%suitepath(utplsql.framework_tester.core.annotations)
--%suitepath(utplsql.ut3_tester.core.annotations)

subtype t_procedure_name is varchar2(250) not null;
type t_procedures is table of t_procedure_name;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package test_expectation_processor is

--%suite(expectation_processor)
--%suitepath(utplsql.framework_tester.core.expectations)
--%suitepath(utplsql.ut3_tester.core.expectations)

--%context(who_called_expectation)

Expand Down
2 changes: 1 addition & 1 deletion test/ut3_tester/core/test_file_mapper.pks
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package test_file_mapper is

--%suite(file_mapper)
--%suitepath(utplsql.framework_tester.core)
--%suitepath(utplsql.ut3_tester.core)

--%test(Maps file paths into database objects using default mappings)
procedure default_mappings;
Expand Down
2 changes: 1 addition & 1 deletion test/ut3_tester/core/test_output_buffer.pks
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package test_output_buffer is

--%suite(output_buffer)
--%suitepath(utplsql.framework_tester.core)
--%suitepath(utplsql.ut3_tester.core)

--%test(Receives a line from buffer table and deletes)
procedure test_receive;
Expand Down
2 changes: 1 addition & 1 deletion test/ut3_tester/core/test_suite_builder.pks
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
create or replace package test_suite_builder is
--%suite(suite_builder)
--%suitepath(utplsql.framework_tester.core)
--%suitepath(utplsql.ut3_tester.core)

--%context(suite)
--%displayname(--%suite annotation)
Expand Down
2 changes: 1 addition & 1 deletion test/ut3_tester/core/test_suite_manager.pks
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package test_suite_manager is

--%suite(suite_manager)
--%suitepath(utplsql.framework_tester.core)
--%suitepath(utplsql.ut3_tester.core)

procedure create_dummy_long_test_package;

Expand Down
2 changes: 1 addition & 1 deletion test/ut3_tester/core/test_ut_executable.pks
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package test_ut_executable is

--%suite(ut_executable)
--%suitepath(utplsql.framework_tester.core)
--%suitepath(utplsql.ut3_tester.core)

--%context(do_execute)

Expand Down
2 changes: 1 addition & 1 deletion test/ut3_tester/core/test_ut_suite.pks
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package test_ut_suite is

--%suite(ut_suite)
--%suitepath(utplsql.core.framework_tester)
--%suitepath(utplsql.ut3_tester.core)

--%beforeeach
procedure cleanup_package_state;
Expand Down
2 changes: 1 addition & 1 deletion test/ut3_tester/core/test_ut_test.pks
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package test_ut_test is

--%suite(ut_test)
--%suitepath(utplsql.framework_tester.core)
--%suitepath(utplsql.ut3_tester.core)

--%beforeeach
procedure cleanup_package_state;
Expand Down
2 changes: 1 addition & 1 deletion test/ut3_tester/core/test_ut_utils.pks
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create or replace package test_ut_utils is

--%suite(ut_utils)
--%suitepath(utplsql.framework_tester.core)
--%suitepath(utplsql.ut3_tester.core)

function get_numeric_delimiter return varchar2;

Expand Down
4 changes: 0 additions & 4 deletions test/ut3_tester_helper/main_helper.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,5 @@ create or replace package body main_helper is
ut3.ut_utils.append_to_list(a_list,a_items);
end;

procedure output_null is
begin
dbms_output.enable(null);
end;
end;
/
2 changes: 0 additions & 2 deletions test/ut3_tester_helper/main_helper.pks
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,5 @@ create or replace package main_helper is

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

procedure output_null;

end;
/
11 changes: 7 additions & 4 deletions test/ut3_user/api/test_ut_runner.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ end;';
procedure close_newly_opened_transaction is
l_output_data dbms_output.chararr;
l_num_lines integer := 100000;
pragma autonomous_transaction;
begin
--Arrange
create_test_spec();
Expand Down Expand Up @@ -285,19 +286,21 @@ end;';
end;

procedure db_link_cleanup is
begin
ut3_tester_helper.run_helper.db_link_cleanup();
end;
pragma autonomous_transaction;
begin
ut3_tester_helper.run_helper.db_link_cleanup();
end;

procedure db_link_setup is
l_service_name varchar2(100);
pragma autonomous_transaction;
begin
ut3_tester_helper.run_helper.db_link_setup();
end;

procedure raises_20213_on_fail_link is
l_reporter ut3.ut_documentation_reporter := ut3.ut_documentation_reporter();
l_lines ut3.ut_varchar2_list;
pragma autonomous_transaction;
begin
--Arrange
--Act
Expand Down
1 change: 0 additions & 1 deletion test/ut3_user/test_user.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ create or replace package body test_user is
ut3.ut_coverage.set_develop_mode(true);
--improve performance of test execution by disabling all compiler optimizations
ut3_tester_helper.main_helper.execute_autonomous('ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL=0');
--dbms_output.enable(null);
end;

end;
Expand Down