The basics of embedded programming: Part 9 - Software Test and ValidationComplex systems need testing to ensure that they work as they are intended. But bugs can be subtle, particularly in embedded systems, where specialized hardware and real-time responsiveness make programming more challenging.
Fortunately, there are many available techniques for software testing that can help us generate a comprehensive set of tests to ensure that our system works properly. In this last part in this series, we examine the role of validation in the overall design methodology as well as the nuts-and-bolts techniques for creating a good set of tests for a given program.
The first question we must ask ourselves is how much testing is
enough. Clearly, we cannot test the program for every possible
combination of inputs. Because we cannot implement an infinite number
of tests, we naturally ask ourselves what a reasonable standard of
One of the major contributions of software testing is to provide us with standards of thoroughness that make sense. Following these standards does not guarantee that we will find all bugs. But by breaking the testing problem into subproblems and analyzing each subproblem, we can identify testing methods that provide reasonable amounts of testing while keeping the testing time within reasonable bounds.
The two major types of testing strategies follow:
- Black-box methods generate tests without looking at the internal structure of the program.
- Clear-box (also known as white-box) methods generate tests based on the program structure.
In this concluding part in this series, we cover both types of
tests, which complement each other by exercising programs in very