Building a Simple Blog Engine with ASP.NET MVC and LINQ - Part 4
page 2 of 8
by Keyvan Nayyeri
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 25656/ 304

A Short Overview of Unit Testing

Test-Driven Development (aka TDD) is nowadays the most common way to develop software among architects and developers. Raise of Agile development methodologies and the growing number of small software teams is the main reason to choose TDD as the main option for developing software (of course there are some other reasons as well).

I suppose that you (as readers of this article) have a background in TDD and unit testing from the past because there is no doubt that I cannot teach you such stuff here, but a short related introduction to the topic of this article is mandatory.

The main and most common part of TDD is unit testing. Unit testing is a process and a set of techniques to divide an application into smaller (small) units that are independent from each other and can work isolated then test each unit to make sure it works as expected.

Unit testing works based on some principles. The first one is breaking the application into small pieces which lets you examine their working easily. The second principle is the fact that these units are isolated and work independently from others. This isolation lets you change a unit without having any effect on another unit.

Unit testing techniques test these pieces to see if each piece works as expected for different situations and input data. In this case, once you pass all tests, you can move on to the next stage in your development. But the good point is the fact that if you change other elements and units of the code then they would not break your existing code and if they do (which is not surprisingly unexpected) then your existing tests will fail and alert you about a problem.

So you can go back and forth and refractor your code without breaking existing code and consistency of your code and this is the main reason that many developers have chosen this as their primary process for development.

However, I cannot talk much about Test-Driven Development and unit testing here and I should not, of course. But I just want to say that there are various techniques for unit testing data layer, abstract code or web services. There are also some well-documented patterns and practices on how to write your code to make the unit testing process easier.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 1 and 3 and type the answer here:

User Comments

Title: Writing Assignment Help   
Name: Writing Assignment Help
Date: 3/19/2010 8:57:49 AM
Comment:
Your blog provides us a very great information. Its really very helpful to me to find result on search engine. Hope to hear more good information related to searching from your side.
Title: nice blog i learn a lot from it. Thanks for sharing. regards, rosela   
Name: Watch Pacquiao Vs Clottey Live online
Date: 3/9/2010 6:43:14 PM
Comment:
nice blog i learn a lot from it.
Thanks for sharing.

regards,

rosela
Title: blog hopping...nice blog   
Name: Webthesurfi Rugs Webdesign
Date: 3/9/2010 6:40:17 PM
Comment:
blog hopping...nice blog
Title: first step   
Name: swarovski for men
Date: 3/8/2010 3:47:14 AM
Comment:
Its first time here i found its very nice and informative blog. Thanks for sharing this useful post with us. i wanna to be here very often. I am going to check this site for more details
Title: your blog is very imformative and i learn a lot from it. Thanks for sharing. regards, rosela   
Name: Watch Pacquiao Vs Clottey Live
Date: 2/25/2010 9:15:22 PM
Comment:
your blog is very imformative and i learn a lot from it.
Thanks for sharing.

regards,

rosela
Title: very entertaining and informative blog. Ill be back..   
Name: Webthesurfi Rugs Webdesign
Date: 2/25/2010 7:37:42 PM
Comment:
very entertaining and informative blog. Ill be back..
Title: wow..i love reading your blog. i'll be back soon..   
Name: Sikat ang Pinoy
Date: 2/12/2010 5:01:11 PM
Comment:
wow..i love reading your blog. i'll be back soon..
Title: sikat ang pinoy   
Name: renantech@yahoo.com
Date: 1/29/2010 8:40:21 PM
Comment:
I like blogengine.net powered by asp.net because this is the free technology that i can create modern website for my personal use or for business use. I would like to thank you for sharing your thoughts and time into the stuff you post!! Thumbs up!
Title: hii   
Name: s
Date: 10/19/2009 12:51:50 AM
Comment:
nice work..
Title: Busby SEO Test   
Name: ranelyn_castro@yahoo.com
Date: 11/29/2008 12:30:54 AM
Comment:
What a nice post about Building a Simple Blog Engine with ASP.NET MVC and LINQ
Title: Source code?   
Name: James
Date: 10/31/2008 12:21:35 PM
Comment:
Great article! where is the source code?
Title: Outstanding article!ank you!   
Name: Ryan
Date: 10/11/2008 5:53:56 PM
Comment:
Outstanding article Keyvan! I would love to see the completed blog. I realize there have been some changes to the framework but, the views would be a very caluable post.

Th
Title: Nice   
Name: Nano
Date: 7/25/2008 12:56:14 PM
Comment:
I can't wait any more... Next part plz!
Title: Kblog View   
Name: Shaurav
Date: 7/22/2008 12:41:55 PM
Comment:
When are you going to publish the next part of it where you are going to talk about Views
Title: KBlog DEMO   
Name: Jame
Date: 6/19/2008 10:35:05 PM
Comment:
Can you provide the KBlog DEMO download address?
Title: MVC   
Name: Asmi
Date: 6/9/2008 5:24:51 AM
Comment:
Nice Article!! Waiting for the next to implement these practically.........
Title: MVC   
Name: Basheer Ahmed
Date: 5/17/2008 2:58:30 PM
Comment:
trp to put all series in one pdf file format
Title: sweet   
Name: Johan
Date: 5/13/2008 3:59:36 PM
Comment:
Nice article, looking forward for the next one.

Product Spotlight
Product Spotlight 






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2010 ASPAlliance.com  |  Page Processed at 3/20/2010 6:17:06 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search