Program testing can be used to show the presence of bugs, but never to show their absence!
- Edsger Dijkstra
- Edsger Dijkstra
This chapter provides a base of knowledge aimed to help software engineers to write meaningful test cases. The starting point for this process is the understanding of the requirements of the system being tested. Without that information, it is not feasible to design nor implement valuable tests. After that, several actions might be executed before the actual coding of the tests, namely, test planning and test design. Once we start the test coding process, we need to have in mind a set of principles to write code right, and also a set of anti-patterns and bad smells to be avoided. All this information is provided in this chapter in form of the following sections:
- The importance of requirements:Â This section provides a general overview...