Persistence

Database stubs created in HCL OneTest™ API can be non-persistent or persistent.

A non-persistent database stub will start from the same known state each time it is run. That is, any changes made to the contents of a database stub during its use will be lost when the stub is stopped. This enables tests to run against a known starting state.

In contrast, a persistent database stub will remember its state when it is stopped, overwriting the previous saved state. When it is restarted, the stub will have the same data that it had when it was last stopped.

It is possible to change a stub from being persistent to being non-persistent. This is useful if you want a stub to be persistent while you design, build, edit, and refine it for a test case; and then non-persistent, and thus in a known start state, each time that it is used.

Note: In HCL OneTest API, you have the option to record SQL but not create or use database stubs.
Feedback