How to continue run my QTP scripts after computer reboot? - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: How to continue run my QTP scripts after computer reboot? (/Thread-How-to-continue-run-my-QTP-scripts-after-computer-reboot) |
How to continue run my QTP scripts after computer reboot? - Kevin Tsai - 05-10-2011 Deal all, Is there any way to continue run my scripts after computer reboot? assume i have a test scenario that contains 3 actions, the second actions need reboot my computer, after reboot, how to make QTP remember which actions it should pick up and continue running? thanks for help! RE: How to continue run my QTP scripts after computer reboot? - manabh - 05-10-2011 Hi, Try to update some flags in runtime data sheet or any config file & read from it after reboot RE: How to continue run my QTP scripts after computer reboot? - Kevin Tsai - 05-11-2011 Thanks for reply, after the computer reboot, I thought the flag in runtime sheet will not saved, so this will not work. save the flag in external file can help, but if the action(which will process reboot computer) was called by many other actions, how do i set the flags? set different flag for each actions? For example, scenario1 contains action1, action2(which will reboot my computer) and action3; scenario2 contains action4, action2 and action5, when scenario1 done , the vbs suppose to run scenario2, but the computer reboot when it run action2,scenario1, in this situation , i can re call the vbs again but how i set the flags to make it ignore action1 and action2 of scenario? and when the action2 of scenario was executed, how to make the vbs to ignore the whole scenario1 and part of scenario2? if i set one flag to each actions, it seems can do, but i have almost 100 actions now and it will grow soon, maintenance the flag file will be my nightmare. thanks! RE: How to continue run my QTP scripts after computer reboot? - deepaksporty - 05-20-2011 I think you should maintain a excel sheet which your script reads to run actions based on the flags (ON/OFF) set for those actions. Now what you can do here is that before your script reboots your computer you can set OFF the flag in the sheet for action 2 and save the sheet. next time when the script runs it would see action as OFF and it would not run. You can set flags to OFF for those actions which are already run so that QTP does not repeat them. let the excel sheet drive your testing RE: How to continue run my QTP scripts after computer reboot? - Skepsis - 06-13-2011 The simplist way is to have, at the beginning of each scenario a choice of where to go next based on reading in a configuration file. As QTP runs, afer the reboot, it reads the config file (just some text lines) and launches the correct scenario and then the Scenario decides where to continue from through the choice it also reads from the config file. Just before you reboot create the config file and put in it the scenario to run and the place to run from along with any persistant variable info you want to carry over. I find multiple actions a pain so use library files and functions instead. The different scenarios are different paths through the many functions. |