Background
Currently, when running tests from developer IDE (like SQLDeveloper/TOAD/SQLPlus/sqlcl etc.), utPLQL always runs tests in an autonomous transaction.
At the end of test-run, utPLSQL does an explicit rollback and closes the autonomous transaction, leaving the current session intact.
This behavior is OK, when you want to make sure that running tests does not affect your session state regardless of commits/rollback/DDL inside tests or tested code.
There are scenarios, where user might want to keep the modified state of the data after the test finishes without performing an explicit commit in their tests.
Proposed solution
- Add parameter
a_force_manual_rollback to ut.run procedures (not functions)
- Make sure that with
a_force_manual_rollback=true the following happens:
- Run is executed in current transaction
- The rollback is not performed
--%rollback(manual) is implicitly applied to the whole run, so automatic transaction control is disabled for all the tests getting executed.
The a_force_manual_rollback=true will have a side effect of leaving data changed between individual tests and therefore should be used with caution and awareness of side effects.
Background
Currently, when running tests from developer IDE (like SQLDeveloper/TOAD/SQLPlus/sqlcl etc.), utPLQL always runs tests in an autonomous transaction.
At the end of test-run, utPLSQL does an explicit rollback and closes the autonomous transaction, leaving the current session intact.
This behavior is OK, when you want to make sure that running tests does not affect your session state regardless of commits/rollback/DDL inside tests or tested code.
There are scenarios, where user might want to keep the modified state of the data after the test finishes without performing an explicit commit in their tests.
Proposed solution
a_force_manual_rollbacktout.runprocedures (not functions)a_force_manual_rollback=truethe following happens:--%rollback(manual)is implicitly applied to the whole run, so automatic transaction control is disabled for all the tests getting executed.The
a_force_manual_rollback=truewill have a side effect of leaving data changed between individual tests and therefore should be used with caution and awareness of side effects.