Persistence

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

A non-persistent database stub starts 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 is lost when the stub is stopped. This process 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 previously 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. Make a stub persistent while you design, build, edit, and refine it for a test case. Make a stub non-persistent if you want a known start state each time the stub is used.

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