473,382 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Nunit Multiple Test Fixture Setups Teardowns in VB.net

Hi,
I have been recently been putting together a test
environment for a
mutiple Project Visual Studio Solution. The test
environment is
declared as a separate Project 'TestEnvironment' and
within this I have
a folder representing each Project of the Solution.
e.g.
<pre>
TestEnvironment
|
|__DalFixture
| |_____BaseDalFixture.vb
|
|__BusinessRulesFixture
| |
| |_____BaseBusinessRulesFixture.vb
| |
| |_____Users
| |___UsersFixture.vb
|
|__BaseTestEnvironmentFixture.vb
</pre>
Under each folder i then have a base fixture class each
of which
inherit from a BaseTestEnvironmentFixture.
I was hoping that using this structure each subsequent
fixture that i
define (i.e. see UsersFixture.vb in the above diagram)
would be able to
inherit any setup/disposal information using the
<FixtureSetup><FixtureTeardown> attributes. However when
i compile and
run my tests i get errors regarding reflection and the
tests all fail.
Currently the 'BaseTest...' classes are not marked with
the <Fixture>
attribute. However they do have <FixtureSetup> in them on
an Init()
method ... of which I am calling using mybase.Init()
within the
UsersFixture.Init() method (which is marked as <Fixture>
and with
<FixtureSetup> respectively).
My assumption was that when NUnit invokes a test fixture
it calls some
kind of setup routine for each of the test fixtures and
calling into
their base each time would have a knock on effect of
instantiating a
whole test environment ... clearly i am either doing this
wrong or
taking a wrong approach? I have tried similarly using the
<Setup>
attribute. Ideally i would like to omit the mybase.calls
so that the
environment initialises correctly for all the " Project
Fixture ". Can
anyone help i would really appreciate it as I am bit
stuck and seeking
some advice?
Thanks in advance,
Best Regards
Nick Ford

Jul 21 '05 #1
0 1495

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

Similar topics

11
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
7
by: Alvin Bruney | last post by:
I've a question on unit testing with NUnit. I'm sure I'm missing just a little thing here. Why doesn't NUnit allow me to test a routine with parameter in it like what i want to do is test ...
6
by: Boniek | last post by:
Hi I have this modul but I don't know how I can use it. I run tests on my project but I don't see any important information. I see only "Test started for my assembly" and "Done". Have you any...
4
by: geoffblanduk_nospam | last post by:
I have an NUnit test plan with well over 500 tests. I now need to produce a test plan document for these tests - documenting them one by one with Word is a painfull task. I was thinking that...
1
by: Samuel R. Neff | last post by:
We have a class that is a basic wrapper around a native 3rd party C DLL. We created an NUnit test against the wrapper and it passes fine the first time. However, when we run the tests again, it...
2
by: Erik | 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...
0
by: Nick Ford | last post by:
Hi, I have been recently been putting together a test environment for a mutiple Project Visual Studio Solution. The test environment is declared as a separate Project 'TestEnvironment' and...
20
by: Parag | last post by:
Hi, I am trying to figure out best testing tool for my project. I have narrowed down my requirements to two tools NUNIT and VSTS unit. But I have used neither and I have to use only one of them....
2
by: j | last post by:
I've used NUnit before, but I've never had this problem. I am trying to test a web service. I've written my tests, decorated the fixture, and the tests and everything compiles, but when I load...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.