Error Handling while running Batch file - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Error Handling while running Batch file (/Thread-Error-Handling-while-running-Batch-file) |
Error Handling while running Batch file - webapp - 03-13-2008 Hi, We have a situation that while running batch files,if we come across any errors, we need to skip that statement and go to the next statement. The error could occur on any test in the batch file.(for eg- If we have 20 tests to run in the batch file, if the error occurs in the 5th or 13th test , it should skip that and go to the next statement and complete running the entire batch.) And also we do not have QC in our company. Thanks. RE: Error Handling while running Batch file - Ankur - 03-14-2008 QC would have been a savior here! Nevertheless you can use Automation Object Model(AOM) to open and run your tests. QTP tests run in "silent mode" when invoked through AOM and will not pop-up any error messages. RE: Error Handling while running Batch file - webapp - 03-19-2008 Hi Ankur, Can you please explain how to use AOM. If we use this , after running all the scripts will QTP give results showing where the script failed and due to what reason ? And also if we have Msgbox "" statements in a script , when we run the script, we have to manually click on OK on the message box. How can we avoid clicking it if this script is a part of the batch (which someone from the company will run it at night & see the results in the morning). Thanks, RE: Error Handling while running Batch file - Ankur - 03-19-2008 Please look at the QTP documentation for AOM, there are numerous examples to get started. Also I don't find the logic behind using msgbox statement while running unattended scripts. |