Ask a Question

How to run same script on multiple instances

mazhar555
Contributor

How to run same script on multiple instances

Hello,



How can i run the same script on multiple instances, objects are same but URL is different e.g.



http://ae001vm0131/AppV2.3Paris/ is URL and ABC is object



http://ae001vm0131/AppV2.2Paris/ is URL and ABC is object



in that case object is same only URL is different, so how can i parameterize the URL?

-
Muhammad Mazhar Mahmood
Certified Software Tester (CSTE)
5 REPLIES 5
mazhar555
Contributor

RE: How to run same script on multiple instances

Well I got the solution, its quite simple, from NameMapping just set URL = *. Image is attached for reference.
-
Muhammad Mazhar Mahmood
Certified Software Tester (CSTE)
srichart
New Contributor

RE: How to run same script on multiple instances

This is quite simple. 

But I do not see how to use this to test a more complex web application.  I am attempting to test multiple instances of Microsoft CRM (read hundreds of web objects in the test).  I want to quickly switch from testing the development, test and production environments without having to use conditional statement.  Also, I do not want to learn every instance.  This would not work if another instance is built with a different URL.

Anyway to set the URL as a variable and define the pages with enough parameters it can be identified in all of the environments?

RE: How to run same script on multiple instances

Hi Sam,




Anyway to set the URL as a variable



You can use project variables instead of constant values in your Name Mapping scheme. Please see the "Specifying Identification Property Values" help topic ( http://www.automatedqa.com/support/viewarticle.aspx?aid=2887 ) for more information.

sguda
Regular Contributor

RE: How to run same script on multiple instances

I have this situation

I developed the project with keyword tests, test1, test2, test3.



It is developed with url https://qafa.fameinc.com/CallowayQA_P1/Login.aspx ,

Now i want to run the same test against another version of the application with url https://qafa.fameinc.com/CallowayQA_P2/Login.aspx.



So i used wild card in name mapping for page object for the num 1 and 2 in the url.

Also in Tested Apps i changed the url to new version P2 url in command line under parameters.



It is opening the IE with new version url P2 but again executing steps in the test with old version url P1 as the iexplore TOURL statement is pointing to old version P1.



So i removed iexplore TO URL statement in the keyword test , then it is executing the test with new version url P2.

Please suggest if what i am doing is right or is there any other solution to do this.



Thanks in advance.

RE: How to run same script on multiple instances

Hi Sri,


If you specify the target web page from the command line, using the ToUrl method is not necessary.

cancel
Showing results for 
Search instead for 
Did you mean: