From Requirements To Test Cases

Program testing can be used to show the presence of bugs, but never to show their absence!- 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 ...

Get Mastering Software Testing with JUnit 5 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.