How to merge two scripts of the same URL in QTP 9.5 - 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 merge two scripts of the same URL in QTP 9.5 (/Thread-How-to-merge-two-scripts-of-the-same-URL-in-QTP-9-5) |
How to merge two scripts of the same URL in QTP 9.5 - Rangi - 09-23-2009 Hi all , I have some test cases which has common steps.. e.g. Test Case 1: Steps a,b,c,d,e,f,g,h Test Case 2: Steps a,b,c,d,i,j,k,l.. etc. So i need to record and create a common script for the common set of steps (e.g. a,b,c,d) and then have separate scripts for the other steps in each test case (e.g. 1. e,f,g,h 2. i,j,k,l). My plan is to create a common script and then create separate scripts. And then merge the common script and the other scripts as necessary. so the Scripts for the test cases will look like this, Test Case 1: Common Script + Script for steps e,f,g,h Test Case 2: Common Script + Script for steps i,j,k,l Is there a possibility to do this? If so please let me know. NOTE: I am using QTP 9.5 Thank you RE: How to merge two scripts of the same URL in QTP 9.5 - Saket - 09-23-2009 Yes Rangi, this is possible to do. You will have create the script as reusables and then you can include them in any script you need. In my opinion you should create reusables for each common and seperate functions. Then you will be able to assemble them in a script as you need for case 1 and 2. RE: How to merge two scripts of the same URL in QTP 9.5 - Ankur - 09-23-2009 This is what the reusable action does. You create a piece of code and use it over and over again at various places. Regarding merging of actions we don't have a straight forward way like the we have for splitting. But you can do it this way:
-- Edit: Looks like we both were replying at the same time Saket RE: How to merge two scripts of the same URL in QTP 9.5 - Rangi - 09-24-2009 Thank you very much Saket and Ankur .. Ankur i read your articles 'Step by Step Guide line to learn QTP', which is really helpful . Thanks again to both of you |