KLOC – What does it mean to Software Testing

Introduction to KLOC

Lines of Code (LOC) is one of the software metric that is used by most of the people for Software Measurement. Thousand lines of code is treated as KLOC. This metric helps us in knowing the size and complexity of the Software Application. Click here for more details on KLOC. This info is from wikipedia

What does it mean to Software Testing

We do test applications with the intention to see if the promised functionality works fine or not. Any deviation here will be considered as a Bug. So each of these bugs must be originated from some line of code in the product.

So it’s understood that when the size of the code is more there is a chance for more number of bugs in the prodcut. Even most of the process to talk about some % of issues is fine or acceptable quality per KLOC(even though there is lot of subjectivity).

The Defect Density is arrived at Number of Bugs / KLOC per the product under test. The defect density is one of the metric used to measure the quality of the product. Most of the Quality Process does talk about this metric.


The concern in this approach is that how these values are measured. The general bias with KLOC is that people try to see that only the excutable lines of code in the product.

Each every line in the product may not be code at all & we may not execute each and every one of them. So it’s not taken care, then the issues related to documentation, images, installation etc might be misleading.

Since we are looking at KLOC as the size of the product it’s better to include each and every entity that effects the same. Then it’s helpful for both development and test teams.

Explore posts in the same categories: Programming, Project Management, Software Development, Software Metrics, Software Testing, Test Metrics

11 Comments on “KLOC – What does it mean to Software Testing”

  1. Mallikarjun Says:

    Agreed, the entities that effects this can be criticality of bugs, Lines of unreachable code. For example a product with bug density of 15 minor/KLOC is better than product with 10 major bugs/Kloc

  2. Venkat Says:


    Thanks for your comments.

    The unreachable code (dead code) is the bottleneck incase if it exists for the Bug Density

  3. Search Job Says:

    I must say this is a great article i enjoyed reading it keep the good work

  4. Tania Says:

    Yeah! this method surely help the tester a lot. A nice post.

  5. hi,

    this is nice blog for software testing. if u take care of pc maintenance then u can also become the good tester….

  6. Shayna Says:

    Ahaa, its nice dialogue concerning this article here at this webpage, I have read all
    that, so now me also commenting at this place.

  7. Colin Says:

    Link exchange is nothing else but it is simply placing the other person’s website link on your page at appropriate place and other person will also do same for you.

  8. Prakash Says:

    Thanks for this post. I didnt found KLOC in my textbook and google help me to reach here, really appreciating blog.

  9. Remarkable issues here. I am very satisfied to look your post.
    Thanks a lot and I am looking forward to contact you.
    Will you please drop me a e-mail?

  10. hair care Says:

    I every time used to read post in news papers but now as I am a user of
    net so from now I am using net for articles, thanks to web.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: