Generating Fake Data in Java with jFairy

Generating fake data can be a common need when developing applications or loading test data into a database. jFairy is a great fake data generator library built in Java that is very easy to use. jFairy allows you to build data sets containing diverse types of data including names, addresses, telephone numbers, dates, large integers, usernames, email addresses, and a lot more.

Below is an example from the Big Datums GitHub repo that uses jFairy to create a tabular data set with 10,000 records. The genPeopleData() method outputs a fixed structure of personal type data, but allows users to specify the number of records, the field delimiters, and whether or not to include a header or enclose fields with quotes.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">