Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamically run QTP script on multiple servers
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
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
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
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?
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
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 ??
Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
>>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.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#5
Solved: 11 Years, 4 Months, 3 Weeks ago
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.
Reply
#6
Solved: 11 Years, 4 Months, 3 Weeks ago
what you are doing is the correct process to run the file automatically
Reply
#7
Solved: 11 Years, 4 Months, 3 Weeks ago
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/
Reply
#8
Solved: 11 Years, 4 Months, 3 Weeks ago
@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.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#9
Solved: 11 Years, 4 Months, 3 Weeks ago
Yes i was able to resolve the problem by parameterizing the URL field. Thanks for all your help.

QTP forum rocks!!!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP/UFT - Storing Multiple Arrays In An Array Eitel13 0 1,777 07-17-2018, 04:37 PM
Last Post: Eitel13
  How to dynamically find the OracleFormWindow? arpan 0 1,754 04-26-2017, 12:45 AM
Last Post: arpan
  How to run multiple iterations only on a set of lines in script amit25007 0 2,435 05-17-2016, 10:48 AM
Last Post: amit25007
  How to click on all links dynamically in UFT? Rohan 9 18,412 02-25-2016, 10:42 AM
Last Post: vinod123
  How to Verify Static Object Text which is changing Dynamically with Expected Result johnny77 0 3,288 06-25-2015, 11:32 AM
Last Post: johnny77

Forum Jump:


Users browsing this thread: 1 Guest(s)