Web testing same app in multiple domains

My organization builds our websites to multiple domains, depending on where we are in the development cycle: dev, test, stage, production. Thus we need our automated tests to run in each of these domains without modification. We can do this with our current home grown automation tool.

This seems to be a problem for VS 2005. Recorded webtests have the domain recorded into them. Is there anyway to repoint a recorded webtest to another domain

Coded tests (created from a recording) also have the domain in numerous strings. While the coded tests can be edited to replace the domain part of the url with a variable, the question is, how do I set the variable at runtime to point to a particular domain

I imagine that this could be done by having domain-specific config files that can be specified at runtime, but I've been unable to get this to work using normal ConfigurationSettings.AppSettings.Get call.  Is there another approach






Answer this question

Web testing same app in multiple domains

  • Drummos

    Josh,

    Thanks for the reply, and yes, that would seem to do the trick. Although I'm unclear as to if this will apply to recorded tests too.

    And thanks for the tips on how to accomplish this now with coded tests.

  • bambag

    As a matter of fact, I recently added this feature in our development tree, so it should show up in the next CTP release this summer.  We now automatically parameterize all the web servers so that the http://server:port part can be set via a context parameter.  You will be able to override/change the server your test targets by modifying the context parameter, specifying a context parameter override with the same name in the load test, or by setting it in an environment variable (useful if running from the command line).

    In the meantime, you could have your coded web tests read the server name out of a common file that contains the server name using StreamReader, read from a database, or you could do Enviroment.GetEnvironmentVariable() in your code.

    I hope that helps and I'm sure you'll like the new parameterization feature once it's available.

    Josh

  • dotAge

    This will apply to recorded tests.  After you record a test, you will be able to click a button which will parameterize each of the webservers in the test.  You can then control the value of this parameter in the web test or override it from the load test or from an environment variable.

  • Web testing same app in multiple domains