Q

What is test granularity?

Test granularity is the level of detail at which your software tests and test cases address your project.

What is test granularity?
Test granularity is the level of detail at which your tests address your project. For instance, a project that opens a file, converts it from .bmp to .jpg, and saves it can have any level of granularity. The lowest granularity, of course, would be to simply open a .bmp and save it as a .jpg. Higher granularity starts testing things like what file location the tests are opened from (disk, USB, network share, URL, etc.), saving to various file locations (disk, USB, network share, URL, etc.) and file formats (valid BMP, invalid BMP), saving over an existing file, etc.

Many IT shops focus on the lowest possible granularity, which tests I call "validation" or "verification." The tests are focused primarily on just the functionality requested, and rarely consider negative (failure) test cases.

While organizations think they're helping themselves by keeping testing costs low, they are actually hurting themselves. Those negative test cases that aren't discovered during the product development phase will typically surface during support, dragging resources off the next project back onto the original project.

Test case granularity is definitely a function of the application, the project criticality, and the schedule. You may work on projects where only the most basic negative cases are required. You may also have projects where deep negative testing is required -- for instance, a simple content-only website versus a medical device or piece of medical record software. When in doubt, revert to the customer, provide them with concrete examples of the test granularity you're thinking of working to, and help them find the right level of granularity.

This was first published in March 2009

Dig deeper on Software Testing and QA Fundamentals

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchSOA

TheServerSide

SearchCloudApplications

SearchAWS

SearchBusinessAnalytics

SearchFinancialApplications

SearchHealthIT

Close