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

Skip to content

Commit 4e3a654

Browse files
committed
Updated documentation.
1 parent 6bf2c8e commit 4e3a654

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

docs/userguide/running-unit-tests.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,26 @@ Executes all tests from package _HR.TEST_APPLY_BONUS_ and provide outputs to DBM
131131

132132
For details on build-in reporters look at [reporters documentation](reporters.md).
133133

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)
143+
144+
Example invocation:
145+
```sql
146+
begin
147+
ut.run('hr.test_apply_bonus', a_force_manual_rollback => true);
148+
end;
149+
```
150+
151+
152+
This option is not anvailable when running tests using `ut.run` as a table function.
153+
134154
## ut.run functions
135155

136156
The `ut.run` functions provide exactly the same functionality as the `ut.run` procedures.

0 commit comments

Comments
 (0)