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

Skip to content

Commit 15562f8

Browse files
committed
Renamed ut_junit_reporter to ut_xunit_reporter
1 parent e2e2e7a commit 15562f8

7 files changed

Lines changed: 25 additions & 23 deletions

File tree

client_source/sqlplus/ut_run.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Parameters:
2424
A textual pretty-print of unit test results (usually use for console output)
2525
-f=ut_teamcity_reporter
2626
A teamcity Unit Test reporter, that can be used to visualize progress of test execution as the job progresses.
27-
-f=ut_junit_reporter
28-
A junit xml format (as defined at: http://stackoverflow.com/a/9691131 and at https://gist.github.com/kuzuha/232902acab1344d6b578)
29-
Usually used for consumption by Continuous Integration servers like Jenkins/Hudson or Teamcity
27+
-f=ut_xunit_reporter
28+
A XUnit xml format (as defined at: http://stackoverflow.com/a/9691131 and at https://gist.github.com/kuzuha/232902acab1344d6b578)
29+
Usually used by Continuous Integration servers like Jenkins/Hudson or Teamcity to display test results.
3030
If no -f option is provided, the ut_documentation_reporter will be used.
3131
3232
-o=output - file name to save the output provided by the reporter.

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ The following table is a work in progress right now, and **will** change. If y
5555
| Multiple Output Reporters can be used during test execution | No | Yes |
5656
| DBMS_OUTPUT | Yes | Yes (format changed) |
5757
| Stored in Table | Yes | On Roadmap |
58-
| JUnit XML Format | No | On Roadmap |
58+
| XUnit XML Format | No | Yes |
5959
| HTML Format | Yes | On Roadmap |
6060
| File | Yes | On Roadmap |
61-
| Realtime test execution results | No | On Roadmap |
61+
| Realtime test execution results | No | Yes |
6262
| Custom Output reporter | Yes | Yes |
6363

6464
<sup>1</sup> Annotations are specially formatted comments in your package specification. This enables *declarative* test configuration that is coupled with the source code. See Documentation for more details.

source/install.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ whenever oserror exit failure rollback
165165
@@reporters/ut_teamcity_reporter_helper.pks
166166
@@reporters/ut_teamcity_reporter_helper.pkb
167167
@@reporters/ut_teamcity_reporter.tpb
168-
@@reporters/ut_junit_reporter.tps
169-
@@reporters/ut_junit_reporter.tpb
168+
@@reporters/ut_xunit_reporter.tps
169+
@@reporters/ut_xunit_reporter.tpb
170170

171171
set linesize 200
172172
column text format a100

source/reporters/ut_junit_reporter.tps

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
create or replace type body ut_junit_reporter is
1+
create or replace type body ut_xunit_reporter is
22

3-
constructor function ut_junit_reporter(a_output ut_output default ut_output_dbms_output()) return self as result is
3+
constructor function ut_xunit_reporter(a_output ut_output default ut_output_dbms_output()) return self as result is
44
begin
55
self.name := $$plsql_unit;
66
self.output := a_output;
77
return;
88
end;
99

10-
overriding member procedure after_calling_run(self in out nocopy ut_junit_reporter, a_run in ut_run) is
10+
overriding member procedure after_calling_run(self in out nocopy ut_xunit_reporter, a_run in ut_run) is
1111
l_suite_id integer := 0;
1212
l_tests_count integer := a_run.results_count.ignored_count + a_run.results_count.success_count + a_run.results_count.failure_count + a_run.results_count.errored_count;
1313

@@ -18,9 +18,6 @@ create or replace type body ut_junit_reporter is
1818

1919
procedure print_test_elements(a_test ut_test) is
2020
begin
21-
-- http://stackoverflow.com/questions/4922867/junit-xml-format-specification-that-hudson-supports
22-
-- http://stackoverflow.com/questions/8079071/xml-format-specification-dtd-xsd-for-unit-test-reports
23-
-- https://gist.github.com/kuzuha/232902acab1344d6b578
2421
self.print_text(
2522
'<testcase classname="'||get_path(a_test.path, a_test.name)||'" ' ||
2623
' assertions="'||a_test.results.count||'"' ||
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
create or replace type ut_xunit_reporter under ut_reporter_base
2+
(
3+
/**
4+
* The XUnit reporter.
5+
* Provides outcomes in a format conforming with JUnit4 as defined in:
6+
* https://gist.github.com/kuzuha/232902acab1344d6b578
7+
*/
8+
constructor function ut_xunit_reporter(a_output ut_output default ut_output_dbms_output()) return self as result,
9+
10+
overriding member procedure after_calling_run(self in out nocopy ut_xunit_reporter, a_run in ut_run),
11+
member function get_common_item_attributes(a_item ut_suite_item) return varchar2
12+
)
13+
not final
14+
/

source/uninstall.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ drop type ut_documentation_reporter;
104104

105105
drop type ut_teamcity_reporter;
106106

107-
drop type ut_junit_reporter;
107+
drop type ut_xunit_reporter;
108108

109109
drop type ut_event_listener;
110110

0 commit comments

Comments
 (0)