Ask a Question

Restoring SQL db quickly through TestComplete

Frequent Contributor

Restoring SQL db quickly through TestComplete

Hi all,


I would like to perform multiple functional tests using our software which, in the back end, interacts with a MS SQL database in a data destructive manner i.e. changes table data, etc.


Then I would like to quickly restore the db to it's pre-functional test state and perform more tests (so each set of tests always start with the db in the same state).


Currently it seems I would have to manually restore the db between each set of tests.

Is there a way with TestComplete to restore a SQL db at runtime to a previous state without going through the SQL Management studio UI?


Just thought this might be a problem many people have had and is solved.


Thanks much


Apologies @daniel_dewinter. I believe in SSMS there would be a "GO" between the two which batches them as SQL server likes. As long as you send them as two separate queries (which is what I do) you should be gold!

Hi @daniel_dewinter@maximojo


Can you please share the full code to restore DB and killing process?




Showing results for 
Search instead for 
Did you mean: