| || |
Calling a Function when Test execution is stopped
Sorry if this post is too long [img]/images/graemlins/smile.gif[/img]
We are using a hybrid framework in our company and all the functional libraries and ORs are stored in a shared drive at a common location. Now that the manual testers from other teams/companies will run our scripts, we don't want them to give access to this network shared drive where all the resources are stored. For this we have come up with a solution comprising of following steps -
1.Immediately when the user starts the automation test, call a function which will map to shared drive with thru command line -
SystemUtil.Run "net","use * \\SharedDrive\Path /user:domain\uid password"
2. Execute the usual GUI function in the function libraries
3. Once all the functions get executed, call a function which will disconnect the mapped network drive.
My concern is that what if the user manually stops the QTP execution while the tests are running. This way he will get the access to the n/w drive because the test execution never reached the point where we disconnect the drive which we mapped at step1 above.
I was just wondering if it's possible by using QTP's AOM to call a function when the user hits STOP button in QTP.
Or please let me know if you have some other solution to overcome this drawback of our process.
Re: Calling a Function when Test execution is stop