Forum Discussion

mazhar555's avatar
mazhar555
Contributor
15 years ago

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?

  • Well I got the solution, its quite simple, from NameMapping just set URL = *. Image is attached for reference.
  • srichart's avatar
    srichart
    New Contributor
    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?
  • sguda's avatar
    sguda
    Regular Contributor
    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.
  • Hi Sri,


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