QA Engineer walks into a bar. Quickly orders a second beer before the first is served.
—@botticus
Our tests in the previous chapter were easy to write. Each test required very little input, so that the test functions were three or four lines at max. But what if we want to write tests for more complex situations? We will need to look closer at the data related to our tests. Ideally, we want to test diverse data to cover as many border cases as possible (see Figure 9-1). At the same time, we cannot cover every possible input to our program by tests. How can we implement data-driven tests? In this ...