How to configure .NET test assembly to use website web.config?

Posted by Morten Christiansen on Stack Overflow See other posts from Stack Overflow or by Morten Christiansen
Published on 2010-04-05T12:44:11Z Indexed on 2010/04/05 13:13 UTC
Read the original article Hit count: 203

Filed under:
|

I've run into a problem setting up Selenium tests for an ASP.NET MVC project in cases where I need the settings provided in the web.config of the site under test. The problem is that I want to create a dummy user before running the test and this causes an error saying that the password-answer supplied is invalid. This is due to the test assembly not using the web.config, instead using default values for membership configuration.

I've tried to copy the relevant section (membership configuration) into the app.config of the assembly without luck, but I admit I'm just grasping at straws here.

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about testing