The Psychology of Quality and More |
CHAPTER 10 : Programming Usage
10.7 TestabilityTesting code is a very difficult and often laborious task. Making the code testable from the beginning will almost always save much time during the test period, and will make maintenance much easier. There are several characteristics of testable code which can be aimed for during design and coding: 10.7.1 Minimize function inputs/outputsTo test a function fully, all combinations of inputs should be used and all ranges of output generated. If there are many inputs or possible outputs (parameters or other data), it will be impossible to fully test the function. 10.7.2 Minimize nestingEach level of nesting implies a branch of some kind, which will follow or not follow the nesting. To fully test a function, all combinations of paths through the code should be exercised. Many branches means many possible paths and a geometric increase in required tests.
|
Site Menu |
Quality: | Quality Toolbook | Tools of the Trade | Improvement Encyclopedia | Quality Articles | Being Creative | Being Persuasive | |
And: | C Style (Book) | Stories | Articles | Bookstore | My Photos | About | Contact | |
Settings: | Computer layout | Mobile layout | Small font | Medium font | Large font | Translate | |
You can buy books here |
And the big |