5 Software Testing Principles
This chapter covers
- Examining the need for unit tests
- Differentiating between types of software tests
- Comparing black-box and white-box testing
A crash is when your competitor’s program dies. When your program dies, it is an “idiosyncrasy.” Frequently, crashes are followed with a message like “ID 02.” “ID” is an abbreviation for idiosyncrasy and the number that follows indicates how many more months of testing the product should have had.
—Guy Kawasaki
Earlier chapters in this book took a very pragmatic approach to design and deploy unit tests. I took a deep look at all the JUnit 5 capabilities and at the architecture of both JUnit 4 and JUnit 5 and demonstrated how to migrate between the two versions. This chapter steps back to look at the various types of software tests and the roles they play in the application life cycle.
Why would you need to know all this information? Unit testing is not just something you do without plans and preparations. To become a top-level developer, you need to contrast unit tests with functional and other types of tests. Functional testing simply means that you evaluate the compliance of a system or component with the requirements. When you understand why unit tests are necessary, you need to know how far to take your tests. Testing in and of itself is not the goal.