Many of the test cases for an application involve data defined by the data model. To achieve good test coverage it is customary to run the test cases for a variety of different input data sets. This can be achieved by manually specifying different input data. However, this is a complex task and it is easy to miss important input data and thereby miss bugs.
Fuzzy testing is about pseudo-randomly generated input data. A test case is written without specifying the exact input data, but only with parameters driving the pseudo-random generation of input data for the test case. The test case can then be run a specified number of times with different seeds for the input data generation, thereby discovering bugs with input data you may not have selected manually.
We will demonstrate how we used fuzzy testing based on JUnit 4 and EMF to find bugs in the implementation of a real world application. We will show how to set up a build configuration with Hudson to continuously run the test cases with different seeds in one (explorer) job. You’ll also learn how to run a selected number of seeds defined by explorer job in your integration build.
We revised this talk based on the very good feedback on EclipseCon Europe 2012. We added more detail to how fuzzy input generation works and how the provided generator can be used in other scenarios.