Software Testing Tips
page 3 of 10
by Brendan Enrick
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 40240/ 58

How many tests should I write?

This is one of the most common questions asked by new testers. For now I will take the cowardly approach and say, "it depends". I've read posts from people touting the number of tests they've written. This is a new metric as if "line count" wasn't already bad enough. There is a balance here that we are looking for. Just with the line count.

If your line count is small you're application probably doesn't do very much and if it is large then your application might be cumbersome and difficult to maintain. When you don't have many tests your code is more prone to errors, but if you've written too many tests maintainability disappears. But wait! Didn't I say earlier that tests make code more maintainable. Well, yes I did, but if you write too many it becomes difficult to change the code. If you test every single possible minute little thing in your application you're going to have a heck of a time changing anything.

When you're writing tests make sure you have just enough to give yourself confidence that your code is working.

I highly recommend against ever setting code coverage or test count goals. If you set goals for these you're just creating incentives to write more tests than is required. Too many tests can create the same problems as too much code. Why? Because tests are code.


View Entire Article

User Comments

Title: QA Manager   
Name: Sami Ullah
Date: 2010-10-22 3:08:04 AM
Comment:
Hi ! These tips are really useful.
Title: SOA Testing   
Name: SOA Testing
Date: 2010-09-06 1:17:21 AM
Comment:
Hi.
These tips are very useful one It contain very important detail Its really a fantastic things for me
Title: Software Testing   
Name: SOA Testing
Date: 2010-08-23 4:15:48 AM
Comment:
Wow..These are really a great tips it will useful for me I like it very much.
Title: SQA Services   
Name: SOA TESTING
Date: 2010-08-10 2:08:58 AM
Comment:
Hello..
Wow great post you have give us wonderful tips It will useful for us.






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


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-26 10:41:12 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search