Solved

NUnit asp.net Application

Posted on 2013-11-01
2
332 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

617 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