An article called DDSteps - Data Driven Sanity describes how we turned a manual testing nightmare into an automated bliss. From the article's description of how to solve data-driven test problems:
Testing your solution for every type of input and making sure it will pass function tests is difficult at best. Usually, this is done "by hand" and requires real people. And, yes, it is boring and time consuming. So you have to automate it, just like you did with JUnit tests for unit testing.There's also a video (6MB, WMV format) you can watch to see a simple example of data driven testing. (Editor's note: this is very similar to FIT, another testing mechanism based on datasets, which is based on HTML tables rather than Excel, but definitely represents another approach, with DDSteps being focused more on JUnit integration.)
By Function tests we mean, "Does it work like the use case says it should". We mean full, system, end-to-end tests, using a production-like environment. We mean using a browser, surfing the web application and then checking the real database for results.
Automating function tests is hard, mostly since they suffer from the same problem as the manual testing. Many of the tests are the same; just the data is slightly different in each test.
Data driven testing on the other hand separates the testing code from its input. This and the reusable test steps makes it easy to maintain and evolve the test cases, you get reuse instead of copy-paste. Need another field? Just add new column in your input and handle it in your test case and voila. There will be no explosion of test methods, no massive round of changes!