Home > Ask the Software Quality Experts > Software Testing and Quality Assurance Questions & Answers > Granularity in test case design
Ask The Software Quality Expert: Questions & Answers
EMAIL THIS

Granularity in test case design

John Overbaugh EXPERT RESPONSE FROM: John Overbaugh

Pose a Question
Other Software Quality Categories
Meet all Software Quality Experts
Become an Expert for this site


Software quality news and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 06 February 2008
I want to develop a series of test cases, which will then be used to guide the creation of automated scripts. I'd like to know how detailed the description of the process should be. Should I be including detailed steps, or a high level overview of what I'd like the scripts to test?


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Software Testing and Quality Assurance
Why do performance testers write new scripts so often?
How to create performance testing workload models
Fixing Web application performance troubleshooting problems
Expert advises on implementation of Selenium IDE for effective software testing
When should regression testing occur in an automated test plan?
Achieving peak performance in integration testing
Getting answers about OpenSTA script problems
Defining core software regression tests
Breaking in functionality on UI application pages
Where to find good methodology guides for software testing

Software test design
How to create performance testing workload models
CA's APM solution helps JN Data address performance issues
Parasoft Concerto targets policy-driven development
Why automated software testing fails and pitfalls to avoid
Essentials of static source code analysis for Web applications
Leaner test cases speed test planning, design
Streamlining test planning and design
Conformiq taps multi-core power for automated test case design
How test managers can shine in agile development: Tutorial, part two
Testing mobile Web applications for usability and context

Software testing and quality assurance (QA) fundamentals
How to deal with iteration issues in Agile
Five steps to fostering better software tester and QA results
Software Testing: New software testing technologies bring new challenges
Testing strategies for complex environments
Astronaut's STPCon advice: Teamwork delivers "The Right Stuff"
How to make your software tamperproof
Software consortium seeks standard quality metrics
Demo: Using WebGoat, a free software testing tool
Seven steps for a quality change and configuration management program
Winning responses to "Why is QA always the bottleneck?"

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
gray box  (SearchSoftwareQuality.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


Test case granularity will probably be one of those bones of contention in the QA industry which never goes away. It's a great discussion though -– and I'll answer it philosophically first and then offer some guidelines I like to use. From a Zen approach, the granularity to use is the granularity to serve you best. I know that is sort of frustrating, but it is true. Agile testing is all about this approach -- write as little as you need to achieve the highest quality. It comes down to my mantra and my personal mission statement: effectiveness and efficiency. To some degree, these are complementary. To some degree they can be mutually exclusive. On any test project, I aim to maximize both our effectiveness (how well we test) and our efficiency (how many resources -- time, equipment and so forth are used). Write test cases that allow you to achieve the highest level of quality with the least amount of time, people, and resources.

OK -- now for more concrete answers to your question. In my experience, the granularity needed in writing your cases depends a lot on two main factors: How many times the cases will be executed, and who will run them. There may be other factors at play here, such as management's top-down process, client requirements and so forth, but in the end these are the two key factors for me. Let's look into each factor briefly.

How many times will the cases be executed? This is the number one most important factor, in my opinion, about how granular to go (coupled with the next factor, which is who will execute them). When I'm working a project in my current role, on a content-heavy Web site, I look at the project being worked on. If it's a one-time, content-heavy project with just a few templates, I recognize that 1) it needs to go out at the highest possible quality, and 2) it will probably never be touched again. In these cases, I encourage my team to write "titles-only" test cases. I focus on capturing our thoughts and demonstrating our coverage in the least-burdensome way. As long as I know that the author, or another member of the team who is familiar with the technology and the goals of the project, will be running the case, I trust that a title-only test case will be executed as intended.

At the same time, when I'm working on a long-term project which I know will undergo several releases which will modify the core code as well as add new functionality (especially true for software products and services I've worked on like Microsoft Exchange ActiveSync, Microsoft Office Live Meeting, or Microsoft Office), then I want to be sure my cases are quite clear. I emphasize capturing the goal of the case (justification for why we should "spend" time and money executing the case), clear preparation requirements, clear steps, and a single expected outcome. I make this up-front investment because I know that people's memory of one case out of 1,000 or 10,000 or more cases simply won't be fresh during the next release. Documentation pays off here. It's the same with subject matter dependent cases (for instance, cases we were writing on Circuit City's retail management system transformation project). If a case requires a high degree of subject matter expertise, and the case will probably be exercised by someone without that knowledge, every bit of information needed to execute that case had better be in the case itself.

Another key factor to consider is who will be running the test case. If the author, or someone equally experienced, equally familiar with the technologies involved, and equally familiar with the product or service being tested will be executing the cases down the road, I'm more inclined to allow titles-only cases -- as long as the project is a one-time thing. If the case has a likelihood of being outsourced, or there's a strong chance the executor will not be as knowledgeable as the author, I will fall back to my "full-test case" approach and require justification, steps, and so forth.

If my team is responsible for both the test case design as well as the automation, I'm again open to titles-only, as long as the author is comfortable that she or he can remember the intent of the case when it comes time to author. In more agile environments, this is more likely simply because the test case is written in the same general time frame as it will be automated. If another person will be automating cases (in a test environment, for example, where non-technical SMEs are writing the cases and handing them to a couple of full-time automators), I'm definitely going to require full cases be written again.

Software testing resources:
How to design test cases

How to define a test strategy

Modular test case design consolidates tests

At a second level, write the cases in such a manner that you will personally be best served. I'm not the world's strongest coder, so when I sit down to write automation for a given test case, I generally start out with a series of comments outlining the steps I have to perform. Writing these in the test case may or may not be helpful; Generally, manual execution is different from the steps required for automation. So I try to keep the concept of test case granularity separate from automation procedures.

I recently tackled this subject on my personal blog ThoughtsonQA.blogspot.com. You can read the article here.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Software Quality - Software Maintenance, Software Requirements, Software Standards
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2006 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts