NUnit ASP.NET and web.config

  • Thread starter Thread starter Adie
  • Start date Start date
A

Adie

Hi, qnyone know how I can get NUnit to work with the connection string
being pulled from my web.config?
 
I assume you are talking the GUI here. If so, your best method is to copy if
you are passing a connstring into your object being tested.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
Adie,

I added this line to my [TestFixture] class and added a Test.Dll.Config file to the bin directory.

protected static string i_connection = System.Configuration.ConfigurationSettings.AppSettings.Get("connection");


----- Adie wrote: -----

Hi, qnyone know how I can get NUnit to work with the connection string
being pulled from my web.config?
 
Adie said:
Hi, qnyone know how I can get NUnit to work with the connection string
being pulled from my web.config?

Dear Sir:
To solve this problem,you must used Nunit 2.1.4,and create project in
root of your web application.then replace Project|Edit|Configuration
File Name to "web.Config" file.in [TestFixtureSetUp] tag in test file
initialize your connection string.

Scincerly
 
Back
Top