This chapter covers
- How to perform specification-based testing and create test cases based on the specification
- What boundary testing is and how to create test cases for the boundaries of your program
- Specification-based testing in practice
Software requirements are, undoubtedly, the most valuable artifact when it comes to software testing. After all, requirements tell us precisely what the software needs to do and what it should not do. Requirements describe the intricacies of the business rules the software has to implement and which we need to validate. Therefore, requirements should be the first artifact you go for when it comes to testing!
In this chapter, we are going to explore ideas related to what we call specification-based testing. These techniques use the requirements of the program as input for testing. By requirements, we mean any document, written as text, that describes what a functionality should do. Think of an agile user story or a UML use case. The specific format does not matter. In simple words, we will discuss how we can use all the information that is available in the requirements to systematically derive a set of tests that fully exercise that requirement.