As I’m looking into GraphQL and Spring Boot, I needed some test data. I didn’t feel very creative but I didn’t want to settle for user1, user2, … either. Enter Mockaroo!

Generating Person data

Mockaroo offers a wide range of predefined types, such as first name, IBAN, color, email, IP, and what not. For my GraphQL application I just need this:

Field Name Field Mockaroo Type
firstName First Name
lastName Last Name
email Email

Next I set the number of rows to 10 and the format to JSON. So it looks something like this: Mockaroo Person

When you hit the preview button, you get an idea what it looks like, for instance:

[{
  "firstName": "Torie",
  "lastName": "Blamphin",
  "email": "tblamphin0@webnode.com"
}, {
  "firstName": "Meredeth",
  "lastName": "Shernock",
  "email": "mshernock1@yandex.ru"
}]

You can also go for SQL. Just change the format in the dropdown. For SQL, you can also set the name of the table you are inserting to (here: PERSON).

insert into PERSON (firstName, lastName, email) values ('Maddy', 'Bachshell', 'mbachshell0@dropbox.com');
insert into PERSON (firstName, lastName, email) values ('Juanita', 'Dudden', 'jdudden1@naver.com');

Or oldschool XML 😊 :

<?xml version='1.0' encoding='UTF-8'?>
<dataset>
  <record>
    <firstName>Jasun</firstName>
    <lastName>Voller</lastName>
    <email>jvoller0@newyorker.com</email>
  </record>
  <record>
    <firstName>Lyon</firstName>
    <lastName>O' Liddy</lastName>
    <email>loliddy1@joomla.org</email>
  </record>
</dataset>