What is test granularity?
Test granularity is the level of detail at which your software tests and test cases address your project.
Test granularity is the level of detail at which your tests address your project. For instance, a project that...
Continue Reading This Article
Enjoy this article as well as all of our content, including E-Guides, news, tips and more.
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.
Dig Deeper on Software testing tools and techniques
Related Q&A from John Overbaugh
Defining core software regression tests
Regression testing is defined through software purpose addressed, the common key strategy is to automate the test phase. according to software ... Continue Reading
Formulating test status reports based on daily status criteria
A user requests help deriving the daily status criteria for the test execution of a software project, with status criteria including test execution ... Continue Reading
How to match the test environment to the production environment
Testers often find a gulf between test results in a test environment and test results in a production environment. Testing expert John Overbaugh ... Continue Reading