473,396 Members | 1,864 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,396 software developers and data experts.

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 1784
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
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...
1
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....
5
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...
43
by: sinister | last post by:
Is MS Access a true RDBMS?
0
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...
6
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...
6
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
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....
2
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...
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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,...

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.