473,503 Members | 2,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NUnit web.config ASP.NET?

Hi!

When running NUnit tests against my ASP.NET application I want the values in
the web.config to be loaded, otherwise connectionstrings and other
configurations won't be availible and the tests will fail.

How do I load the web.config from the NUnit tests?

/Erik
Nov 18 '05 #1
2 2043
The name of the configuration file used by default can be
found on the Properties page for the NUnit project. Be
aware that a project is not created if all you do is open
a DLL through NUnit. Instead, start with a New|Project
and then load up the test fixture.

Hope this helps.

Bruce Johnson
http://www.ObjectSharp.com/Bruce
-----Original Message-----
Hi!

When running NUnit tests against my ASP.NET application I want the values inthe web.config to be loaded, otherwise connectionstrings and otherconfigurations won't be availible and the tests will fail.
How do I load the web.config from the NUnit tests?

/Erik
.

Nov 18 '05 #2
Great! tnx!
"Bruce Johnson" <Br***@ObjectSharp.removethis.com> wrote in message
news:00****************************@phx.gbl...
The name of the configuration file used by default can be
found on the Properties page for the NUnit project. Be
aware that a project is not created if all you do is open
a DLL through NUnit. Instead, start with a New|Project
and then load up the test fixture.

Hope this helps.

Bruce Johnson
http://www.ObjectSharp.com/Bruce
-----Original Message-----
Hi!

When running NUnit tests against my ASP.NET application

I want the values in
the web.config to be loaded, otherwise connectionstrings

and other
configurations won't be availible and the tests will

fail.

How do I load the web.config from the NUnit tests?

/Erik
.

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
494
by: Klas Mellbourn | last post by:
I have several assemblies, in separate dll:s, each with nunit tests embedded. Every assembly requires its own config file. I would like to run all nunit tests on the same command line. Like this: ...
0
988
by: Mike | last post by:
I found this message posted from last year: I'm using NUnit to test my assembly. When my assembly runs (.exe) normally it uses it's .config file, but when I test my assembly using NUnit it...
1
1689
by: Peter Rilling | last post by:
When running my unit tests for our web project, I am having a difficult time getting values from the config file. When running from the web server, the config file is able to be read from the...
6
6053
by: tchaiket | last post by:
Hey all, I'm using NUNIT to test our classes. However, I don't want to hard code test data into the NUNIT classes. For example, to test adding a new Client, I don't want to hard code the...
1
1955
by: Gonza | last post by:
Hi group, i'm trying to create tests for my solution, so i have a project with nunit tests. I'm using the data application block as my data access layer, and the problem i'm having is that when i...
1
2985
by: nyathancha | last post by:
Hi, I am using WSE to implement security using x509 certificates. This works when I use a windows client but throws an exception when I use NUnit. My Code looks as follows : UsernameToken...
2
3158
by: chris | last post by:
I have created a file, called nunit_project_name.dll.config, within the bin folder of my Nunit project, but Nunit is not able to find the file. Is this is the right location? I can access the...
1
429
by: skneife | last post by:
Hi! When running NUnit tests against my ASP.NET application I want the values in the web.config to be loaded, otherwise connectionstrings and other configurations won't be availible and the...
2
2232
by: Mark Elliott | last post by:
Hi All, I'm just playing with asp.net mvc and link-to-sql for the first time. I'm using visual web developer 2008. I create the project fine, choose nunit as my test framework in the wizard. ...
0
7353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7011
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5596
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4689
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.