Forum Discussion

Autom8's avatar
Autom8
New Contributor
6 years ago

Changing a keyword test URL

Hello,

 

I am a new TestComplete user, who has been creating keyword tests on my company's sandbox environment. In the coming weeks we will begin testing on our production environment, and so I need the ability to change the URL (The sandbox and Prod sites are otherwise identical).

 

From other posts in the SmartBear community, it seems as though this is possible by using a project variable as the URL property of the name mapping criteria. However, as I am not very familiar with TestComplete, and I was wondering if someone could provide me with more specific instructions to achieve this goal.

 

 

Thank you very much for your time and assistance.

2 Replies

  • cunderw's avatar
    cunderw
    Community Hero

    In general it's not a good idea to hard code anything environment related directly into your tests. A project variable and / or a config file you read into set it would be your best option. A project variable can also be used as the url property of your name mapping criteria.

     

    That said in a pinch, keyword tests files are just xml files, so you should be able to a search and replace in them using any text editor or a powershell script.