Visual Studio project structure - https://www.box.com/s/np59x20f939n3z1g5dvc
I have multiple projects A, B, etc. that have load tests (which in turn call respective web tests) and a settings file separately for each one of them. I am using these settings files to store the info about web servers.
[Settings.xml]
<?xml version="1.0" encoding="utf-8" ?>
<AppSettings>
<WebServer>www.abc.com</WebServer>
<Proxy></Proxy>
</AppSettings>
I am adding this xml file as a data source in the web test as shown here https://www.box.com/s/53vy0ryvye53m76abuun
Project C has a load test that calls upon web tests from other projects (I am only referring to the projects A, B, etc. here). The setting file for project C looks like this.
<?xml version="1.0" encoding="utf-8" ?>
<AppSettings>
<WebServer>www.SomeOtherWebsite.com</WebServer>
<Proxy></Proxy>
</AppSettings>
I want this settings file to be used for running the Loadtest-C i.e. this settings file has to override the individual settings file from each project.
I want to run LoadTest-C sometimes and LoadTest-A or LoadTest-B sometimes. So, I don’t want to change the individual settings files everytime.
Is there a way I can achieve this?
I found using xml files to be the simpler way. But, please do suggest me if there is a better way.
I have searched online and the only thing I found relevant was this - common Settings.settings file for entire solution. I have a lot of projects similar to A, B, etc. and I don’t want to change the links in each and every project as suggested in the answer there.
[I have never tried coded web tests. So I am not sure if that approach works.] [and i am relatively new to performance testing]