You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: development/releasing.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,8 @@ To create a release:
9
9
- wait for th build to complete successfully
10
10
- merge the release branch to master and wait for master build to complete successfully
11
11
- create a release from the master branch using [github releases page](https://github.com/utPLSQL/utPLSQL/releases) and populate release description using information found on the issues and pull requests since previous release.
12
-
To find issues closed after certain date use [advanced filters](https://help.github.com/articles/searching-issues-and-pull-requests/#search-by-open-or-closed-state)
12
+
To find issues closed after certain date use [advanced filters](https://help.github.com/articles/searching-issues-and-pull-requests/#search-by-open-or-closed-state).
- build executed on branch `release/vX.Y.Z-[something]` updates files `sonar-project.properties`, `VERSION` with project version derived from the release branch name
Copy file name to clipboardExpand all lines: docs/userguide/expectations.md
+96Lines changed: 96 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -683,6 +683,8 @@ utPLSQL is capable of comparing compound data-types including:
683
683
- Cursors, nested table and varray types are compared as **ordered lists of elements**. If order of elements differ, expectation will fail.
684
684
- Comparison of compound data is data-type aware. So a column `ID NUMBER` in a cursor is not the same as `ID VARCHAR2(100)`, even if they both hold the same numeric values.
685
685
- Comparison of cursor columns containing `DATE` will only compare date part **and ignore time** by default. See [Comparing cursor data containing DATE fields](#comparing-cursor-data-containing-date-fields) to check how to enable date-time comparison in cursors.
686
+
- Comparison of cursor returning `TIMESTAMP`**columns** against cursor returning `TIMESTAMP`**bind variables** requires variables to be casted to proper precision. This is an Oracle SQL - PLSQL compatibility issue and usage of CAST is the only known workaround for now.
687
+
See [Comparing cursor data containing TIMESTAMP bind variables](#comparing-cursor-data-containing-timestamp-bind-variables) for examples.
686
688
- To compare nested table/varray type you need to convert it to `anydata` by using `anydata.convertCollection()`
687
689
- To compare object type you need to convert it to `anydata` by using `anydata.convertObject()`
688
690
- It is possible to compare PL/SQL records, collections, varrays and associative arrays. To compare this types of data, use cursor comparison feature of utPLSQL and TABLE operator in SQL query
@@ -987,6 +989,100 @@ In the above example:
987
989
- The test `get_events_for_date_range` will succeed, as the `l_expected_bad_date` cursor contains different date-time then the cursor returned by `get_events` function call.
988
990
- The test `bad_test` will fail, as the column `event_date` will get compared as DATE without TIME.
989
991
992
+
### Comparing cursor data containing TIMESTAMP bind variables
993
+
994
+
To properly compare `timestamp` column data returned by cursor against bind variable data from another cursor, a conversion needs to be done.
995
+
996
+
This applies to `timestamp`,`timestamp with timezone`, `timestamp with local timezone` data types.
997
+
998
+
Example below illustrates usage of `cast` operator to assure appropriate precision is applied on timestamp bind-variables in cursor result-set
Copy file name to clipboardExpand all lines: docs/userguide/reporters.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ Example outputs from documentation reporter.
42
42
# JUnit reporter
43
43
44
44
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).
46
46
Please note that in previous versions it was called ut_xunit_reporter and for backward compatibility that name still exists.
47
47
48
48
Invocation of tests with JUnit reporter.
@@ -63,7 +63,7 @@ Example of failure report details
63
63
64
64
# Teamcity reporter
65
65
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.
67
67
The TeamCity format developed by Jetbrains is supported by utPLSQL with `ut_teamcity_reporter`.
68
68
69
69
Invocation of tests with Teamcity reporter.
@@ -74,11 +74,11 @@ The `ut_teamcity_reporter` doesn't accept any arguments.
74
74
75
75
Example of unit test report from Teamcity CI server.
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.
130
130
131
131
132
132
For details on build-in reporters look at [reporters documentation](reporters.md).
133
133
134
+
## Keeping uncommited data after test-run
135
+
136
+
utPLSQL by default runs tests in autonomous transaction and performs automatic rollback to assure that tests do not impact one-another and do not have impact on the current session in your IDE.
137
+
138
+
If you would like to keep your uncommited data persisted after running tests, you can do so by using `a_force_manual_rollback` flag.
139
+
Setting this flag to true has following side-effects:
140
+
141
+
- test execution is done in current transaction - if while running tests commit or rollback is issued your current session data will get commited too.
142
+
- automatic rollback is forced to be disabled in test-run even if it was explicitly enabled by using annotation `--%rollback(manual)
@@ -158,3 +178,17 @@ The concept is pretty simple.
158
178
- as a separate thread, start `ut_runner.run` and pass reporters with previously defined output_ids.
159
179
- 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.
160
180
181
+
# Reports characterset encoding
182
+
183
+
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.
184
+
185
+
If you run your tests using `utPLSQL-cli`, this is done automatically and no action needs to be taken.
186
+
187
+
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`.
0 commit comments