9 Testing
Software testing is a process in which you execute your program using data that simulate user inputs. You observe your program’s behavior to see whether or not it is doing what it’s supposed to do. Tests pass if the behavior is what you expect; tests fail if the behavior differs from that expected.
If your program does what you expect, then for the inputs used, the program behaves correctly. If these inputs are representative of a larger set of inputs, you can infer that the program will behave correctly for all members of this larger input set. This is especially true if you test it with several inputs from this larger set and it behaves as you expect for all of them.
If the behavior of the program does not match the behavior that ...
Get Engineering Software Products: An Introduction to Modern Software Engineering now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.