开发者

Separate Database for Integration Testing

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?


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&displaylang=en
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜