Running SETUP Stored Procedure too many times

Aug 18, 2011 at 7:22 AM

Hi,

 

I'm running T.S.T version 1.7. Generally it runs well. There seems to be a bit of overhead but I assume that is todo with all the logging and transaction management.

 

I seem to have a problem with running SETUP Stored Procedure too many times.

 

I have one test suite with one setup stored procedure and 10 test stored procedures. I expect the setup stored procedure to run only once for the whole testing of the suite, but it runs 10 times, I assume once per test.

 

Could you please advise?

 

Thanks

Aug 20, 2011 at 2:59 AM

The fact that the setup proc runs once per test is by design. You could use the session level setup/teardown. Those are run before and after a test session. Take a look in the documentation at chapter 9 “How to specify SETUP or TEARDOWN procedures” where all the rules around setup/teardown are described.

Sep 27, 2011 at 5:29 AM

Thanks.

I ended up keeping the test suite Setup stored procedure.

With the session level setup you always need a corresponding teardown. The performance was similar or worse moving to the session level methods, and you have the resultant data from all the other tests prior to each test to consider. So I have kept the test suite Setup stored procedure. As designed, it is much cleaner now.

This tool has provided great improvement to my development.