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: docs/userguide/annotations.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,10 +158,10 @@ A `%suitepath` can be provided in three ways:
158
158
*[schema]:suite1[.suite2][.suite3]...[.procedure] - execute all tests in all suites from suite1[.suite2][.suite3]...[.procedure] path. If schema is not provided, then the current schema is used. Example: `:all.rooms_tests`
159
159
*[schema.]package[.procedure] - execute all tests in the specified test package. The whole hierarchy of suites in the schema is built before all before/after hooks or part suites for the provided suite package are executed as well. Example: `tests.test_contact.test_last_name_validator` or simply `test_contact.test_last_name_validator` if `tests` is the current schema.
160
160
161
-
# Using automatic rollbacks in tests
161
+
# Using automatic rollback in tests
162
162
163
163
By default, changes performed by every setup, cleanup and test procedure are isolated by savepoints.
164
-
This solution is suitable for use-cases where the code that is getting tested as well as the unit tests themselves do not use transaction control (commit/rollback) or DDL commands.
164
+
This solution is suitable for use-cases where the code that is being tested as well as the unit tests themselves do not use transaction control (commit/rollback) or DDL commands.
165
165
166
166
In general, your unit tests should not use transaction control as long as the code you are testing is not using it too.
167
167
Keeping the transactions uncommitted allows your changes to be isolated and the execution of tests does not impact others who might be using a shared development database.
@@ -180,7 +180,7 @@ It is recommended to move such DDL statements to a procedure with `pragma autono
180
180
Doing so allows your tests to use the framework's automatic transaction control and releases you from the burden of manual cleanup of data that was created or modified by test execution.
181
181
182
182
When you are testing code that performs explicit or implicit commits, you may set the test procedure to run as an autonomous transaction with `pragma autonomous_transaction`.
183
-
Keep in mind that when your tests runs in autonomous transaction it will not see the data prepared in setup procedure unless the setup procedure committed the changes.
183
+
Keep in mind that when your test runs as autonomous transaction it will not see the data prepared in a setup procedure unless the setup procedure committed the changes.
184
184
185
185
# Order of execution
186
186
@@ -217,23 +217,21 @@ When processing the test suite `test_pkg` defined in [Example of annotated test
217
217
218
218
# Annotation cache
219
219
220
-
utPLSQL needs to scan sources of package specifications to identify and parse annotations.
221
-
To improve framework startup time, specially when dealing with database users owning large amount of packages the framework has build-in persistent cache for annotations.
220
+
utPLSQL needs to scan the source of package specifications to identify and parse annotations.
221
+
To improve framework startup time, especially when dealing with database users owning large amounts of packages, the framework has a built-in persistent cache for annotations.
222
222
223
-
Cache is checked for staleness and refreshed automatically on every run.
224
-
The initial startup of utPLSQL for a schema will take longer than consecutive executions.
223
+
The annotation cache is checked for staleness and refreshed automatically on every run. The initial startup of utPLSQL for a schema will take longer than consecutive executions.
225
224
226
-
If you're in situation, where your database is controlled via CI/CD server and gets refreshed/wiped before each run of your tests,
227
-
consider building upfront and creating the snapshot of our database after the cache was refreshed.
228
-
229
-
To build annotation cache without actually invoking any tests, call `ut_runner.rebuild_annotation_cache(a_object_owner, a_object_type)` sql block for every unit test owner that you want to have annotations cache prebuilt.
225
+
If you are in a situation where your database is controlled via CI/CD server and is refreshed/wiped before each run of your tests, consider building the annotation cache upfront and taking a snapshot of the database after the cache has been refreshed.
230
226
227
+
To build the annotation cache without actually invoking any tests, call `ut_runner.rebuild_annotation_cache(a_object_owner, a_object_type)` for every unit test owner for which you want to have the annotation cache prebuilt.
0 commit comments