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

Skip to content

Commit 6110923

Browse files
committed
Updated documentation to include infrmation about reports encoding.
1 parent d887889 commit 6110923

2 files changed

Lines changed: 21 additions & 7 deletions

File tree

docs/userguide/reporters.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Example outputs from documentation reporter.
4242
# JUnit reporter
4343

4444
Most of continuous integration servers (like Jenkins) are capable of consuming unit test execution results in [JUnit](https://en.wikipedia.org/wiki/JUnit) format.
45-
The `ut_junit_reporter` in earlier version referred as ut_xunit_reporter is producing outcomes as JUnit-compatible XML unit test report, that can be used by CI servers to display their custom reports and provide metrics (like tests execution trends).
45+
The `ut_junit_reporter` in earlier version referred as `ut_xunit_reporter` is producing outcomes as JUnit-compatible XML unit test report, that can be used by CI servers to display their custom reports and provide metrics (like tests execution trends).
4646
Please note that in previous versions it was called ut_xunit_reporter and for backward compatibility that name still exists.
4747

4848
Invocation of tests with JUnit reporter.
@@ -63,7 +63,7 @@ Example of failure report details
6363

6464
# Teamcity reporter
6565

66-
[Teamcity](https://www.jetbrains.com/teamcity/) is a CI server by Jetbrains. It supports XUnit reporting and additionally has it's own format of reporting that allows tracking of progress of a CI step/task as it executes.
66+
[Teamcity](https://www.jetbrains.com/teamcity/) is a CI server by Jetbrains. It supports JUnit reporting and additionally has it's own format of reporting that allows tracking of progress of a CI step/task as it executes.
6767
The TeamCity format developed by Jetbrains is supported by utPLSQL with `ut_teamcity_reporter`.
6868

6969
Invocation of tests with Teamcity reporter.
@@ -74,11 +74,11 @@ The `ut_teamcity_reporter` doesn't accept any arguments.
7474

7575
Example of unit test report from Teamcity CI server.
7676

77-
![xunit_reporter_outputs](../images/teamcity_report_example.png)
77+
![junit_reporter_outputs](../images/teamcity_report_example.png)
7878

7979
Example of failure report details
8080

81-
![xunit_reporter_outputs](../images/teamcity_report_example_errors.png)
81+
![junit_reporter_outputs_errors](../images/teamcity_report_example_errors.png)
8282

8383

8484
# Sonar test reporter

docs/userguide/running-unit-tests.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ You can execute any set of tests with any of the predefined reporters.
123123

124124
```sql
125125
begin
126-
ut.run('hr.test_apply_bonus', ut_xunit_reporter());
126+
ut.run('hr.test_apply_bonus', ut_junit_reporter());
127127
end;
128128
```
129-
Executes all tests from package _HR.TEST_APPLY_BONUS_ and provide outputs to DBMS_OUTPUT using the XUnit reporter.
129+
Executes all tests from package _HR.TEST_APPLY_BONUS_ and provide outputs to DBMS_OUTPUT using the JUnit reporter.
130130

131131

132132
For details on build-in reporters look at [reporters documentation](reporters.md).
@@ -140,7 +140,7 @@ Functions provide output as a pipelined stream and therefore need to be executed
140140

141141
Example.
142142
```sql
143-
select * from table(ut.run('hr.test_apply_bonus', ut_xunit_reporter()));
143+
select * from table(ut.run('hr.test_apply_bonus', ut_junit_reporter()));
144144
```
145145

146146
# ut_runner.run procedures
@@ -158,3 +158,17 @@ The concept is pretty simple.
158158
- as a separate thread, start `ut_runner.run` and pass reporters with previously defined output_ids.
159159
- for each reporter start a separate thread and read outputs from the `ut_output_buffer.get_lines` table function by providing the output_id defined in the main thread.
160160

161+
# Reports characterset encoding
162+
163+
To get properly encoded reports, when running utPLSQL with HTML/XML reports on data containing national characters you need to provide your client character set when calling `ut.run` functions and procedures.
164+
165+
If you run your tests using `utPLSQL-cli`, this is done automatically and no action needs to be taken.
166+
167+
To make sure that the reports will display your national characters properly when running from IDE like SQLDeveloper/TOAD/SQLPlus or sqlcl you need to provide the charaterset manualy to `ut.run`.
168+
169+
Example call with characterset provided:
170+
```sql
171+
begin
172+
ut.run('hr.test_apply_bonus', ut_junit_reporter(), a_client_character_set => 'Windows-1251');
173+
end;
174+
```

0 commit comments

Comments
 (0)