Forum Discussion
jmcpeek
12 years agoContributor
We have the same setup with environment details being stored in project/suite variables, but I have a TestComplete userform displayed at the beginning of the run for the user to set the values when it's run manually. I read values from a spreadsheet and let them choose from my pre-defined list and set the variables accordingly.
When it's scheduled (run via command line), I just don't display the form and expect the values to come in with the command line call.
Then in my name mapping file, I've used wildcards for all environment specific objects so the test doesn't care what environment it's running against. For instance, instead of the URL for a page being mapped as "http://www.website.com/portal/index.aspx", it's mapped as "*/portal/index.aspx".
Doing it this way, you don't have to edit the test itself (or have a duplicate copy) whenever you want to change the environment.
When it's scheduled (run via command line), I just don't display the form and expect the values to come in with the command line call.
Then in my name mapping file, I've used wildcards for all environment specific objects so the test doesn't care what environment it's running against. For instance, instead of the URL for a page being mapped as "http://www.website.com/portal/index.aspx", it's mapped as "*/portal/index.aspx".
Doing it this way, you don't have to edit the test itself (or have a duplicate copy) whenever you want to change the environment.