Solved

NUnit asp.net Application

Posted on 2013-11-01
2
319 Views
Last Modified: 2013-11-08
Hi Expert,

I am new in NUnit. It's pretty simple to test a function.
But I really don't know how to setup and test a n-tier asp.net web application.

Any instruction or comment will be very appreciated!!
0
Comment
Question by:jssong2000
2 Comments
 
LVL 35

Accepted Solution

by:
Miguel Oz earned 500 total points
ID: 39617986
This is a summary view: For Nunit, you can only test your business tier if this tier has been properly designed as independent of the other tiers. For example your business logic is in an assembly that you can add to your Nunit project that contain your test methods.
If you have to interact with databases you may need to mock them or you will need a backup/restore sql script to guarantee your initial state is always the same. (if you use the latter it becomes an integration test - the key idea of unit test is to run  in memory without using external dependencies , e.g. interact with DB, web service, file, email)


Some introductory books:
http://pragprog.com/book/utc2/pragmatic-unit-testing-in-c-with-nunit
A bit dated but still relevant and gentle intro to Nunit.
http://artofunittesting.com/
This book is good and the associated web site has nice videos to help you with concepts like mock.
0
 

Author Closing Comment

by:jssong2000
ID: 39634385
Thank you!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now