Dynamically run QTP script on multiple servers - 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: Dynamically run QTP script on multiple servers (/Thread-Dynamically-run-QTP-script-on-multiple-servers) |
Dynamically run QTP script on multiple servers - arpan - 06-11-2013 Hi, I wrote a script for server 1 urls : Code: SystemUtil.Run "http://server1.xyz.xyz.com", "", "", "" I got a new requirement where i've to run the same script on multiple servers. eg. Code: SystemUtil.Run "http://server2.xyz.xyz.com", "", "", "" I'm running my script overnight after a new build is deployed on the server. Is there a way i could dynamically run the script on server 1 and then on server 3 after a new build is deployed on it respectively? Thanks Arpan RE: Dynamically run QTP script on multiple servers - Ankur - 06-11-2013 Arpan, I assume all other variables remain the same like objects etc, what's the difficulty you're facing to implement it? What do you mean by "dynamically run" , is it you want script to automatically identify when the new build is deployed? RE: Dynamically run QTP script on multiple servers - arpan - 06-11-2013 Hi Ankur, I want the script to run on server 1 lets say around 1am and then run the same script for server 2 @ 3am. so to run the script on server 2, i've to change the url's from server 1 to server 2. How can i do that automatically ? Thanks Arpan Also, how can i make the script to automatically identify when the build is deployed ?? RE: Dynamically run QTP script on multiple servers - Ankur - 06-12-2013 >>How can i do that automatically ? How are you scheduling your script? Are you using some initialization script? >>Also, how can i make the script to automatically identify when the build is deployed ? 1) Either you should set some type of polling mechanism whereby your machine can poll the server to find out if a new build is generated 2) OR maybe use some other trigger generated from the build server itself. RE: Dynamically run QTP script on multiple servers - arpan - 06-12-2013 Thanks Ankur for the second problem. >> How do i run it automatically? I'm using Windows Schedular and i wrote a .vbs file which opens qtp, calls the script and then runs it. RE: Dynamically run QTP script on multiple servers - vinod123 - 06-12-2013 what you are doing is the correct process to run the file automatically RE: Dynamically run QTP script on multiple servers - arpan - 06-12-2013 Hi Vinod, I want to run the script automatically on multiple servers(one after another), so the url's i'm using change. For example, If i'm running my script on server 1, my url would look like this: https://server1.xyz.xyz.com/admin/application/ If i'm running my script on server 2, my url would look like this: https://server2.xyz.xyz.com/admin/application/ RE: Dynamically run QTP script on multiple servers - Ankur - 06-21-2013 @arpan: I hope you were able to solve the issue by now. There can be lots of ways to do this. 1) try using an ini file or 2) environment variables. if it is just one after the other as you said, it may just require parameterizing the URL field. RE: Dynamically run QTP script on multiple servers - arpan - 06-21-2013 Yes i was able to resolve the problem by parameterizing the URL field. Thanks for all your help. QTP forum rocks!!! |