DEV Community

Cover image for Using FAKER
Hunter Pollard
Hunter Pollard

Posted on • Updated on

Using FAKER

Using faker will save you so much time and effort when creating fake data for your projects and its so easy to use.

First head to

GitHub logo faker-ruby / faker

A library for generating fake data such as names, addresses, and phone numbers.

logotype a happy-07

Faker

Tests Gem Version Inline docs Test Coverage Maintainability SemVer compatibility

This gem is a port of Perl's Data::Faker library that generates fake data.

It comes in very handy for taking screenshots (taking screenshots for my project, Catch the Best was the original impetus for the creation of this gem), having real-looking test data, and having your database populated with more than one or two records while you're doing development.

NOTE

  • While Faker generates data at random, returned values are not guaranteed to be unique by default You must explicitly specify when you require unique values, see details Values also can be deterministic if you use the deterministic feature, see details
  • This is the master branch of Faker and may contain changes that are not yet released Please refer the…

I love using FAKER for my projects and development websites to flood my database with dynamic information. The nine person team over at Faker say "We're committed to offering the best faker generators." and they surely mean it.

Installation is super easy :
Alt Text

Usage :
Alt Text

This repo is still getting new updates so check in often to see what new things this generator can do. I'm waiting for the Michael Scott quotes generator to be released.

Check out the generators
(Found in README.md) :
Alt Text

Some examples :
Alt Text

Find one you like
(For example Faker::Ancient) :
Alt Text

They even offer customization :
Alt TextAlt Text

Please go ahead and check out FAKER and while your there look into there other repos like :
Alt Text

As far free to use fake data generators go FAKER is easy to use, easy to comprehend and has so many fun generators to really dive deep into.

Top comments (0)