Deeksha_goyal
11 years agoContributor
How to make namemapping file variable
Hi All,
I have 5 environment where i need to run my automated test with different URL. for now i have clonned the scripts and changed the name mapping file.
But now if there is a change in my script. I need to update that in all 5 copies.
I was wondering if we can keep my name mapping file itself variable and configure at run time which file to use for a particular test run. This way i would be able to use one copy for all environments
I have 5 environment where i need to run my automated test with different URL. for now i have clonned the scripts and changed the name mapping file.
But now if there is a change in my script. I need to update that in all 5 copies.
I was wondering if we can keep my name mapping file itself variable and configure at run time which file to use for a particular test run. This way i would be able to use one copy for all environments
- Depending on how your "environments" are setup (domains possibly??), you can use the "OnStartTest" event hanler to set an environment variable to the URL stub for testing. This way, you could set "http://urlOne.com/*" as the enviornment variable and then do a aqString.Replace(url, "/*", "/pageToDisplay.html") where you needed to reference the other pages. Given the information you have provided, it's hard to say what an "environment" is, or how you could determine when you're in one of the five of them.