views:

64

answers:

1

I am performance integration testing where I fire up the ASPX pages using WatiN and fill the fields and insert into the database. There are couple of problems that I am facing.

1) Should I use a completely separate database for integration testing? I already gave db_test and db_dev. db_test is for unit testing and is cleared after each test. db_dev is for developers.

2) When I run WatiN test which are contained in a separate assembly (not separate from unit test assembly which should be better since WatiN test take so much time to run). So WatiN test fire up the WebApps project and uses their web.config which is pointing to the dev database. Is there anyway I can tell WatiN to use a separate web.config which contains a different database name?

A: 

You can use the Web Deployment project to switch web.config files.

<Copy SourceFiles="$(OutputPath)web_Staging.config" DestinationFiles="$(OutputPath)web.config" Condition="'$(Configuration)|$(Platform)' == 'Staging|AnyCPU'" />
<Copy SourceFiles="$(OutputPath)web_Release.config" DestinationFiles="$(OutputPath)web.config" Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
<Delete Files="$(OutputPath)web_Staging.config" />
<Delete Files="$(OutputPath)web_Release.config" />


http://www.microsoft.com/downloads/details.aspx?familyId=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&amp;displaylang=en
Jeff Smith