Search⌘ K

Manual Exploratory Testing—Discovering the Unexpected

Explore the role of manual exploratory testing as a vital complement to test-driven development. Understand how it helps discover edge cases and defects that automated tests miss, and how to integrate feedback into the development cycle to ensure higher quality code.

In this lesson, we’ll appreciate the role of manual exploratory testing as an important line of defense against defects where TDD is used.

Handling complex conditions and edge cases

The biggest threat to our success with TDD lies in our ability to think about all the conditions our software needs to handle. Any reasonably complex piece of software has a huge range of possible input combinations, edge cases, and configuration options. Consider using TDD to write code to restrict the sales of a product to buyers who are 18 years old and above. We must first write a happy path test to check whether the sale is allowed, make it pass, and then write a negative test, confirming that the sale can be blocked based on age. This test has the following form:

Java
public class RestrictedSalesTest {
@Test
void saleRestrictedTo17yearOld() {
// ... test code omitted
}
@Test
void salePermittedTo19yearOld() {
// ... test code omitted
}
}
...