![]() |
|
An e-newsletter published by |
March 2006, Vol. 3 No. 3 |
| Welcome to Food for Thought™, an e-newsletter from Software Quality Consulting. I've created free subscriptions for my valued business contacts. If you find this newsletter informative, I encourage you to continue reading. Feel free to pass this newsletter along to colleagues by clicking this Forward Email link. If you’ve received this newsletter from a colleague and would like to subscribe, please click this Enter New Subscription link. If you don't wish to receive this newsletter, click the SafeUnSubscribe™ link at the bottom of this newsletter, and you won’t be bothered again. Your continued feedback on this newsletter is most welcome. Please send your comments and suggestions to info@swqual.com. |
In This Months’ Topic,
I discuss applying design for testability principles to software testing…
|
|
Design for Testability Many software quality problems are the result of poorly written requirements. We know that 40-60 percent of all software defects are caused by errors in requirements. [1] What this means is that on a typical product development cycle that has say, 500 defects - as many as 300 are caused by poorly written requirements. While most companies recognize the importance of having requirements, many haven’t recognized the importance of having good requirements - requirements that are well-written, unambiguous, and testable. Since so many defects are caused by poorly written requirements, companies should be motivated to improve the quality of their requirements… What can be done to improve requirements? There are a couple of ways to do this:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
What is Design for Testability? Design for Testability (DFT) is a concept developed by electrical engineers to improve the designs of circuit boards so that these boards could be tested using conventional automated testing equipment (ATE). By bringing certain test points out to the edge, the test engineer writing the ATE program is able to test more of the functions the board is intended to perform, thus lowering the failure rate in the field and improving overall quality. Wikipedia defines Design for Testability as:
DFT principles long used by hardware engineers can be applied to both software design and software testing… What is software testability? James Bach [4] and David Gelperin [5] define testability as anything that makes software easier to test by making it easier to design and execute tests. Bach [4] describes software testability in terms of:
Testability, as described by Bret Pettichord, has more of a design component to it:
Improving software testability is clearly an important objective in order to reduce the number of defects that result both from poorly written requirements as well as poorly designed software. Let’s look at how we can apply the principles of DFT to software testing… Applying DFT principles to software testing Design for Testability principles can be adapted for software testing in at least two ways. First, we can use DFT principles to help clarify requirements that may be poorly written so that they can be more easily tested. Second, we can use DFT principles to improve the testability when using automated testing tools. Let’s look at what this means… |
|||||||||||||||||||||||||||||||||||||||||||||
|
DFT for Manual Testing Poorly written requirements create problems for developers and testers. Not only can such requirements be difficult to understand, they can be interpreted in several ways. Rewriting requirements to remove ambiguity often isn’t done for a variety of reasons – there’s no time, the author doesn’t see the value, etc. So the tester is left to guess - How did the developer interpret this? How should I interpret this? Getting clarification from the author of the requirements document often is an exercise in frustration. Asking the developer how they interpreted the requirement can often raise more questions than it resolves. There’s a better way… Testers can rewrite ambiguous requirements – using alternative techniques - so that the requirements become clear and more importantly, testable. After rewriting an ambiguous requirement, the tester can tactfully present the rewritten requirement to both the author - like this…
Once the author agrees to the rewritten requirement, the tester can share this with the developer. Some techniques for rewriting requirements to improve testability include using:
Flowcharts Work flow diagrams and flowcharts are excellent tools for expressing requirements in a way that leads to better understanding. Expressing portions of the requirements using a flowchart enables testers to see all of the paths that need to be tested. This technique also makes it easy to see if all paths were included in the English text. Frequently, rewriting requirements using a flowchart helps identify missing information. Here’s a simple example: As a tester, having the requirements expressed in a flowchart makes it much easier to visualize tests that are required. Using a flowchart in this example also makes it easier to ensure that all paths are defined, including error handling conditions – something that is easy to overlook in English. Testers can also use colored highlighters to mark the paths covered by each test, ensuring that all paths are in fact covered. For an example of rewriting requirements using Structured English, see the September 2004 newsletter... Truth Tables Here is an interesting example of comparing the testability of requirements written in English and the same requirements expressed in a truth table. Truth tables are useful when dealing with several discrete variables that are related. Which is easier to understand, implement, and test?
|
|||||||||||||||||||||||||||||||||||||||||||||
|
DFT for Automated Testing The principle of rewriting requirements to remove ambiguity applies regardless of whether you’re doing manual or automated testing. Applying DFT principles is a bit different for automated testing. Brian LeSuer [3] says that applications need to be designed for automated testing. Specifically, he recommends that application developers follow these rules to help improve the testability of the application:
Bret Pettichord [2] says that testability is a critical aspect of successful test automation efforts:
Bottom Line… Improving testability affects requirements and design. Rewriting ambiguous requirements using alternative techniques leads to requirements that are less ambiguous, more understandable and as a result, more testable. When the requirements are more testable, your customers will find fewer bugs. For test automation to be successful, testers and developers need a common understanding of what is required in order to make most effective use of the test automation tools. ‘Till next time… |
|||||||||||||||||||||||||||||||||||||||||||||
Every month in this space you’ll find additional information related to this month’s topic.
|
Every month you’ll find news here about local and national events that are of interest to the software community …
|
Software Quality Consulting provides consulting, training, and auditing services tailored to meet the specific needs of clients. We help clients fine-tune their software development processes and improve the quality of their software products. The overall goal is to help clients achieve Predictable Software Development™ – so that organizations can consistently deliver quality software with promised features in the promised timeframe. To learn more about how we can help your organization, visit our web site or send us an email. |
I hope this newsletter has been informative and helpful. Your comments and feedback are most welcome. Send me your feedback… Thanks, |