Embedded Systems Design: An Introduction to Processes, Tools, and Techniques

Embedded systems software testing shares much in common with application software testing. Thus, much of this chapter is a summary of basic testing concepts and terminology. However, some important differences exist between application testing and embedded systems testing. Embedded developers often have access to hardware-based test tools that are generally not used in application development. Also, embedded systems often have unique characteristics that should be reflected in the test plan. These differences tend to give embedded systems testing its own distinctive flavor. This chapter covers the basics of testing and test case development and points out details unique to embedded systems work along the way.
Before you begin designing tests, it s important to have a clear understanding of why you are testing. This understanding influences which tests you stress and (more importantly) how early you begin testing. In general, you test for four reasons:
To find bugs in software (testing is the only way to do this)
To reduce risk to both users and the company
To reduce development and maintenance costs
To improve performance
One of the earliest important results from theoretical computer science is a proof (known as the Halting Theorem) that it s impossible to prove that an arbitrary program is correct. Given the right test, however, you can prove that a program is incorrect (that is, it has a bug). It s important to remember that testing isn t about proving the correctness of a program but about finding bugs. Experienced programmers understand...