473,545 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NUnit - Looking for a comprehensive (RDBMS) example implementation

MD
Hello

I work in a .NET environment and I am about to create a development
strategy. As part of this I am looking at implementing a testing tool
to fit in with an iterative approach and NUnit seems to be the logical
choice. Although it works well with very simple classes, it seems to
struggle when you are confronted with anything substantial - eg an
application that accesses/updates an RDBMS.

For instance :-
- how do I test the processing of database operations - a query of any
substance is difficult enough to verify as it requires a test bed of
static data - but an update not only requires a test bed but also a
query to make sure the update was successful - is this the way this is
done - I have read somewhere that NUnit assumes database operations to
be successful - in the real world, this of course can't be assumed so
do I need another tool to test queries (including complex report
queries) and updates.
- how do I test a method that processes say a datatable - do I have to
create a datatable manually then pass this to the method within the
NUnit Assert.

I am looking for simple solutions here - the developers that will
follow this do not have the time to develop numerous complex testing
classes inhereting base classes specially created for the sake of
testing.

Does anyone have examples - say a solution that includes an NUnit
project that tests an RDBMS .NET application.

Many thanks

Mar 4 '06 #1
1 1790
Hello md,

unit testing assumes that u test unit component, not the interation - it's
the integration testing
To test processing of DB operation u need to test
a) stored procedures
b) calling stored procedure
c) component that use SP

separately. Several unit test for each type

When you are writing tests for UI component that use data component with
call of SP u need to Mock this data component
It means that u need know nothing about data component and needn't test in
with your UI component.
See description Mock either in NUnit or use NMock

m> Hello
m>
m> I work in a .NET environment and I am about to create a development
m> strategy. As part of this I am looking at implementing a testing
m> tool to fit in with an iterative approach and NUnit seems to be the
m> logical choice. Although it works well with very simple classes, it
m> seems to struggle when you are confronted with anything substantial -
m> eg an application that accesses/updates an RDBMS.
m>
m> For instance :-
m> - how do I test the processing of database operations - a query of
m> any
m> substance is difficult enough to verify as it requires a test bed of
m> static data - but an update not only requires a test bed but also a
m> query to make sure the update was successful - is this the way this
m> is
m> done - I have read somewhere that NUnit assumes database operations
m> to
m> be successful - in the real world, this of course can't be assumed so
m> do I need another tool to test queries (including complex report
m> queries) and updates.
m> - how do I test a method that processes say a datatable - do I have
m> to
m> create a datatable manually then pass this to the method within the
m> NUnit Assert.
m> I am looking for simple solutions here - the developers that will
m> follow this do not have the time to develop numerous complex testing
m> classes inhereting base classes specially created for the sake of
m> testing.
m>
m> Does anyone have examples - say a solution that includes an NUnit
m> project that tests an RDBMS .NET application.
m>
m> Many thanks
m>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Mar 4 '06 #2

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

Similar topics

4
3578
by: Frank Einstein | last post by:
Looking for a tool that can edit an XML file in a browser. The basic requirement is that the XML file is rendered as an HTML form with editable fields (including add/delete, preferably in accordance with with the document's XSD/DTD or other schema definition). I don't mind the actual form of this tool - could be implemented as a JSP/Servlet,...
1
1744
by: | last post by:
Hi! Can someone tell me can I use MsBuild with NuNit today? Or is MsBuild only available for MSDN subscriptions ? Or what do you use for an automatic build process + automatic NuNit testing. I looking for a 2 in 1 solution (build + NuNit)
5
4634
by: Naveen Mukkelli | last post by:
Hi all, How can we use "NUnit" in socket programming. I mean, I'm writing a server program which accepts connection requests from the clients. I want to test the number of clients whenever a new connection is established. My Server code is : ---------------------------------------------------------------------
43
2856
by: sinister | last post by:
Is MS Access a true RDBMS?
0
1651
by: Ray Tayek | last post by:
hi, getting a: .\Stdafx.cpp : fatal error C1192: #using failed on 'i: nunit\samples\cpp-sample"' 'The filename, directory name, or volume label syntax is incorrect.' nunit is installed in i"\nunit. does anyone know what the problem here is? any pointers will be appreciated.
6
8340
by: Ray Tayek | last post by:
hi, i am preparing to teach a class in c++ and would like to intoduce some unit testing. i can make unit tests in c# using this dll and nant from the command line. i am using visual c++ 2005 express at home (the labs may have an earlier version). does anyone know how to tell visual studio to use this dll? thanks
6
6062
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 Client Name, phone number, email, etc. I want to the NUNIT to read this data from a file. This way I can change the data in a file easily and test...
1
1465
by: DBC User | last post by:
Hi All Sharpies, Which is a good tool for TDD, NUnit or MBUnit? I reas some blogs they say MBUnit is better but I was looking at the activity and it seems MBUnit was last updated in 02/06. Thanks.,
2
5149
by: JohnGoogle | last post by:
Hi, I'm a newbie so sorry if there is a simple answer to this! I'm using C# in Visual Studio Express at the moment. I've downloaded NUnit v 2.2.8 and can load and run the tests they supply (e.g. nunit.util.tests.dll) so the install of NUnit seems OK. I've compiled one of the sample projects (csharp-sample_VS2005). When I do so I get...
0
7473
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7813
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7431
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7761
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5976
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5337
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3457
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1888
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 we have to send another system
1
1020
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.