talira

Generate (almost) realistic fake data for testing, demos, and populating your database during development

open sourceMITself-hostablefree

Faker is a Ruby library that generates fake data such as names, addresses, emails, phone numbers, dates, lorem text and finance details, from hundreds of generators. It has more than 40 locales through the I18n gem, a unique prefix for values that must not repeat, and a seedable random generator for repeatable output. It is a port of Perl's Data::Faker, and is separate from the JavaScript and Python libraries of the same name.

Problems it solves

  • fill my development database with realistic-looking names, addresses and emails
  • generate random but plausible values in Ruby tests instead of hardcoding John Doe everywhere
  • seed a demo app with fake customers, companies and orders
  • make fake addresses and names in German, Japanese or Spanish formats to test localisation
  • get the same random test data on every run so a failing test can be reproduced
  • unique fake emails so test records don't collide on a uniqueness validation
  • placeholder paragraphs, Markdown and lorem ipsum for UI mockups in a Rails app
  • fake bank account details and crypto addresses for testing a finance app
  • phone numbers and postcodes that look right for a given country
  • random dates in the past or future for test records
  • random passwords and domain names for testing sign-up forms

Features

  • generators for internet, people, locations, dates, numbers, strings, finance, lorem text and more
  • more than 40 locales
  • unique values with Faker::<Generator>.unique, clear and exclude
  • deterministic output with a seeded Faker::Config.random
  • locale overrides for threaded servers

Capabilities

Has an APIplan not known

Alternatives

The same job

These do what Faker does.

  1. Faker (Python) A Python package that generates fake data for you

Compare Faker with the top 3