Solved

NUnit asp.net Application

Posted on 2013-11-01
2
318 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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

17 Experts available now in Live!

Get 1:1 Help Now