> Web Hosting Services
home contact

Effectively Improving Code Quality Using Unit Testing

What is Unit Testing? Unit testing, to put it simply, is to test the code in pieces. Each piece is independently tested from the others. It is commonly done as "white box testing", which you can think of as a transparent box that you can see into and based on what you see, that is what you test. Unit testing is often overlooked when it comes to software development. A lot of times software developers will skip this important step of unit testing (either automated, or even manual). By not checking if their code meets the basic business requirements, this can cost the company a lot of money and wasted effort. A bug caught earlier is much cheaper to fix than a bug caught later. Once you have to get QA (the Quality Assurance team) involved, you have already wasted money. Unit testing is an effective way of catching the bugs early in the process.

When you start to go to the next level of unit testing (automated unit testing), you will find even more benefits that come from unit testing. First of all, your tests can be automated and executed every night. This means that you now have a level of confidence in your code which you never had before. If you keep this up, you will know if your new code breaks the existing system in any way, since you are running these tests on a regular basis. At one of the companies which I worked, we slowly introduced unit tests into our application.

It started off as simple tests, and as time went by we added one for each significant bug that we found, to ensure that they would not repeat. This in turn strengthened the quality of our application and we were able to solve many problems much before the actual QA stage. This resulted in better code quality, and in turn the number of overall bugs that actually reached the customer was far less. Infact Microsoft is so convinced that they made unit testing a standard part of the new Visual Studio 2008! You can create your unit tests from right within the actual application.

For .NET, I recommend using NUnit or mbUnit in order to start with your unit testing. Begin with testing your core business objects, and slowly extend your reach. If you have a database, you can create database unit tests that are run nightly that check for existence of bad data such as customers being listed in the same region twice, and so on.

In conclusion, the benefits of unit testing far outweigh any potential minor increase in cost of development time. Start now, if you haven't already started!

Sameer Alibhai, administrator of a .NET C# programming blog, SharpDeveloper.NET, that gives you ways to add that little extra ZING to your code and succeed in the workplace.





Articles
How To Get A Domain Name

3 Easy Steps to Publishing Your Website

11 Tips For Choosing a Web Design Service

Configuring Anti-Spam Hosting is Worth It

Why Finding Web Hosting With An Autoresponder Is Important

All About Dynamic Websites Using PHP and MySQL

Choosing image formats for the web

How to Upload and Install a Wordpress Theme

Why Your Web Host Should Support PHP and MySQL

How to Install Wordpress Plugins

Top 7 Website CMS Systems

Using Wordpress as a CMS

How to Create Your Own Blog Website

5 Steps For Starting A New Website

Adding RSS feeds to your website increases your visibility

11 Essential Considerations When Starting an E-Commerce Website

Why You Should Start a Blog

Tips and Information regarding Webhosting.

Web Hosting Can Be Done On Shared Or Dedicated Servers

Easy Solution to Accepting Payments Online

 
More web hosting articles...
 
Latest Web Hosting News
Web Hosting Sales and Promos Roundup - July 30 2010 - July 30, 2010 -- There was a handful of Web hosting sales and promotions in the last week of July in...
[Fri, 30 Jul 2010 14:44:18 -0700]

BurstNET Announces IPV6 Enabled Web Hosting - July 30, 2010 -- Web hosting provider BurstNET announced this week that it had made Internet Protoco...
[Fri, 30 Jul 2010 13:44:18 -0700]

Web Host Peer 1 Wins Capgemini Colocation Contract - July 30, 2010 -- Canadian-based hosting provider Peer 1 Hosting announced on Thursday that it had si...
[Fri, 30 Jul 2010 14:14:18 -0700]




 
 

TopChoiceReviews.com | Related Sites

Copyright © 2009 TopChoiceReviews.com. All Rights Reserved.