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
50 commits
Select commit Hold shift + click to select a range
169c7c2
Adding additional installation of utPLSQL framework into schema ut3_r…
jgebal Jul 21, 2017
248b243
Changer install.sh to be runnable from both `sqlplus` and `sqlcl`.
jgebal Jul 22, 2017
c79afbd
Trying to test ut3 using ut3 framework installed in separate schema.
jgebal Jul 23, 2017
adbb543
Testing schema `UT3` with tests in schema `UT3_TESTER` and most recen…
jgebal Jul 28, 2017
746eb07
Moved test_annotations from commit a56231c9b232418f589709d5672c1bee23…
Pazus Jul 30, 2017
fe4b993
actualized ut_utils tests to current state of old tests
Pazus Jul 30, 2017
b7c5917
implemented matcher tests
Pazus Jul 30, 2017
2bde41a
Merge remote-tracking branch 'remotes/upstream/develop' into feature/…
Pazus Jul 30, 2017
74f6bc9
splitted old and new tests
Pazus Jul 30, 2017
266ac1f
added test_output_buffer tests
Pazus Jul 30, 2017
fdc2513
Merge branch 'develop' into feature/using_released_to_test_develop
jgebal Aug 2, 2017
d34c9a6
Updated test script to capture failed tests and return non-zero exit …
jgebal Aug 2, 2017
da01280
Merge remote-tracking branch 'upstream/feature/sonar_test_reporter_fi…
jgebal Aug 3, 2017
1b2dd8c
Enabling tests.
jgebal Aug 3, 2017
cc400cb
Fixing utplsql-cli run invocation.
jgebal Aug 3, 2017
34b94de
Enabling coverage for the framework.
jgebal Aug 3, 2017
e2dccea
Merge branch 'feature/sonar_test_reporter_fix' into feature/using_rel…
jgebal Aug 5, 2017
6155357
Changed the cli call to use doc reporter only once
jgebal Aug 5, 2017
d5abea9
enabled test
Pazus Aug 5, 2017
2155b99
added ut_suite_manager tests
Pazus Aug 5, 2017
37e5533
fixed references in test_suite_manager.pkb
Pazus Aug 5, 2017
adb9320
implemented clone of develop branch
Pazus Aug 5, 2017
c6d482c
simple structure
Pazus Aug 5, 2017
c004cc5
Merge remote-tracking branch 'remotes/upstream/develop' into feature/…
Pazus Aug 5, 2017
e678a4e
change to coverage be run for the main branch not the testing branch
Pazus Aug 5, 2017
4121aaf
changed path to sources
Pazus Aug 6, 2017
33ddecc
Update install_and_run_tests.sh
jgebal Aug 6, 2017
7ba703e
Update ut_sonar_test_reporter.tpb
jgebal Aug 6, 2017
ae9fd09
Update .travis.yml
jgebal Aug 6, 2017
97e408c
Update install_and_run_tests.sh
jgebal Aug 6, 2017
067595f
Update .travis.yml
jgebal Aug 6, 2017
dcce789
Update .travis.yml
jgebal Aug 6, 2017
01691eb
Update install_and_run_tests.sh
jgebal Aug 6, 2017
94cd8c6
Switch to new `utplsql-cli` again
jgebal Aug 6, 2017
bf0bd31
Back to old utlplsq-cli
jgebal Aug 6, 2017
d486456
Testing fix on utPLSQL-cli
viniciusam Aug 7, 2017
c0b1a5f
Testing new client build
viniciusam Aug 7, 2017
8e1ab7c
Added source schema parameter
viniciusam Aug 7, 2017
c2af62a
Adding coveralls reporter to check how coveralls handles multiple cov…
jgebal Aug 7, 2017
9180a2b
Merge branch 'feature/remove_pessimistic_coverage_on_project' into fe…
jgebal Aug 7, 2017
7cf00f0
Renamed `tests` directory to `old_tests`.
jgebal Aug 9, 2017
16e5a06
Disabled test due to failures on US7ASCII code page on 12.1 DB
jgebal Aug 13, 2017
cd0d954
Added test for `ut_coverage_sonar_reporter`
jgebal Aug 13, 2017
b330e74
Added test for `ut_coveralls_reporter`
jgebal Aug 13, 2017
c960d44
Fixed failing tests and refactored sonar reporter.
jgebal Aug 13, 2017
41b4849
Fixed issues with framework accessing wrong tables when running self-…
jgebal Aug 17, 2017
48b6b33
Merge remote-tracking branch 'upstream/develop' into feature/using_re…
jgebal Aug 17, 2017
8badb71
Fixed failing test after rename of `tests` to `old_tests`.
jgebal Aug 17, 2017
57902fc
Merge remote-tracking branch 'upstream/develop' into feature/using_re…
jgebal Aug 18, 2017
ff9865a
Moved new test to the old_tests
jgebal Aug 18, 2017
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
Next Next commit
added test_output_buffer tests
added additional grants to ut3_tester
  • Loading branch information
Pazus committed Jul 30, 2017
commit 266ac1f1c80b13f43564358377ae1a02cbdf1e06
2 changes: 1 addition & 1 deletion .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ set feedback off

set feedback on
--Needed for testing coverage outside of main UT3 schema.
grant create any procedure, drop any procedure, execute any procedure, execute any type to $UT3_TESTER;
grant create any procedure, drop any procedure, execute any procedure, execute any type, select any table, delete any table to $UT3_TESTER;
exit
SQL
2 changes: 2 additions & 0 deletions test/install_tests.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
@ut_utils/test_ut_utils.pks
@ut_annotations/test_annotations.pks
@ut_matchers/test_matchers.pks
@ut_output_buffer/test_output_buffer.pks

@ut_utils/test_ut_utils.pkb
@ut_annotations/test_annotations.pkb
@ut_matchers/test_matchers.pkb
@ut_output_buffer/test_output_buffer.pkb

show errors

Expand Down
80 changes: 80 additions & 0 deletions test/ut_output_buffer/test_output_buffer.pkb
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
create or replace package body test_output_buffer is

procedure test_recieve is
l_result varchar2(4000);
l_remaining integer;
l_expected varchar2(4000);
l_reporter ut3.ut_reporter_base :=ut3. ut_documentation_reporter();
begin
--Act
l_expected := lpad('a text',4000,',a text');
ut3.ut_output_buffer.send_line(l_reporter, l_expected);

select * into l_result from table(ut3.ut_output_buffer.get_lines(l_reporter.reporter_id,0));

ut.expect(l_result).to_equal(l_expected);

select count(1) into l_remaining from ut3.ut_output_buffer_tmp where reporter_id = l_reporter.reporter_id;

ut.expect(l_remaining).to_equal(0);
end;

procedure test_doesnt_send_on_null_id is
l_cur sys_refcursor;
begin
delete from ut3.ut_output_buffer_tmp;
--Act
ut3.ut_output_buffer.send_line(null,'a text to send');

open l_cur for select * from ut3.ut_output_buffer_tmp;

ut.expect(l_cur).to_be_empty;
end;

procedure test_doesnt_send_on_null_text is
l_cur sys_refcursor;
l_result integer;
l_reporter ut3.ut_reporter_base := ut3.ut_documentation_reporter();
begin
delete from ut3.ut_output_buffer_tmp;
--Act
ut3.ut_output_buffer.send_line(l_reporter,null);

open l_cur for select * from ut3.ut_output_buffer_tmp;
ut.expect(l_cur).to_be_empty;
end;

procedure test_send_line is
l_result varchar2(4000);
c_expected constant varchar2(4000) := lpad('a text',4000,',a text');
l_reporter ut3.ut_reporter_base := ut3.ut_documentation_reporter();
begin
ut3.ut_output_buffer.send_line(l_reporter, c_expected);

select text into l_result from ut3.ut_output_buffer_tmp where reporter_id = l_reporter.reporter_id;

ut.expect(l_result).to_equal(c_expected);
end;

procedure test_waiting_for_data is
l_result varchar2(4000);
l_remaining integer;
l_expected varchar2(4000);
l_reporter ut3.ut_reporter_base := ut3.ut_documentation_reporter();
begin
--Act
l_expected := lpad('a text',4000,',a text');
ut3.ut_output_buffer.send_line(l_reporter, l_expected);

select * into l_result from table(ut3.ut_output_buffer.get_lines(l_reporter.reporter_id,0));

ut.expect(l_result).to_equal(l_expected);

select count(1) into l_remaining from ut3.ut_output_buffer_tmp where reporter_id = l_reporter.reporter_id;

ut.expect(l_remaining).to_equal(0);

end;

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

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

--%test(Recieves a line from buffer table and deletes)
procedure test_recieve;

--%test(Does not send line if null reporter id given)
procedure test_doesnt_send_on_null_id;

--%test(Does not send line if null text given)
procedure test_doesnt_send_on_null_text;

--%test(Sends a line into buffer table)
procedure test_send_line;

--%test(Waits For The Data To Appear For Specified Time)
procedure test_waiting_for_data;

end test_output_buffer;
/