I am developing with VSTE for Software Developers and I have written a custom membership provider. I have also written unit tests for all public methods on the provider.
I need to run all unit tests three times, each time, I need to change the values in the provider attributes defined in the web.config file. I cannot figure out how to create 3 different web.config files and have them copied to the asp.net output directory before running the tests.
Should I simply create the 3 web.config files in the unit test project, create 3 batch files to move the batch file from the test project directory to the asp.net directory, and create 3 different test run configurations
I need to run these tests in three different fashions for two reasons, the first is to show proper code coverage, and the second is to test the provider with different configuration settings.
Please advise

unit testing asp.net custom providers
i_man
There's no special functionality to support changing the web.config file when running an ASP.NET unit test, so you'll need to do this in your own code. I think your idea of using batch files specified in the run config is probably the most straightforward way to do this. However, this does require doing three separate test runs each time, since you need to change which run config is used.
A slightly more complex method would be to use ordered tests. What you could do is first create three dummy unit tests that just copy one of the premade web.config files to the correct location. Then you could create an ordered test and add tests to it so it looks like the following:
CopyWebConfig1 (a dummy test that copies a web.config to the website directory)
RealTest1 (the tests you actually want to run)
RealTest2
...
RealTestN
CopyWebConfig2
RealTest1
RealTest2
...
RealTestN
CopyWebConfig3
RealTest1
RealTest2
...
RealTestN
When you run this, it will copy the first web.config, then run all your tests, then copy the second, then run all your tests, etc. The problem is that you have to remember to update the ordered test whenever you add/remove/rename a unit test. But this does let you run all your tests for the three configurations in a single test run.