Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use same QTP script for 2 different environments
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
I wrote a script that points to my QA environment URL; it works great. I assume I can use the same script to point to my PROD environment URL simply by using parameterization.

I added an "Environment" column to the Data Table with two values; the URL for QA and the URL for PROD.

I started by adding a description property to each Page object (via Object Repository) and parameterize the "url". When I started this I quickly found this could take quite awhile and thought there might be a better way; is there?

In addition, I have close to 70 actions, each of which uses a "Page" and "Page 2" object. Hopefully, there is just one place where I can switch the URLs for these two objects: Is there? Is the answer to use user-defined environment variables, i.e. one for QA and one for PROD?

Thanks for any helpful tips.
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,
USe MAp repository parameters to handle the 2 different pages but code will work with 1 page name (logical name) but based on the parametrization u can handle it very well.

Regards,
Sankalp
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Handling of security dialogs for different environments Nishaat 4 3,203 09-08-2010, 07:02 AM
Last Post: basanth27
  Running QTP Scripts on multiple SAP Test Environments Newom85 4 7,940 08-02-2010, 07:22 PM
Last Post: lotos
  How to execute the qtp script when this script is added to schedule tasks? venkatbatchu 3 5,543 10-08-2009, 03:19 PM
Last Post: venkatbatchu

Forum Jump:


Users browsing this thread: 1 Guest(s)