Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Java
  3. jFairy

jFairy

Apache-2.0Javav0.8.3

A Java library for generating realistic fake data like persons, companies, and emails with locale support.

Visit WebsiteGitHubGitHub
745 stars151 forks0 contributors

What is jFairy?

jFairy is a Java library that generates realistic fake data for software testing and development. It creates coherent objects like persons, companies, emails, and phone numbers, with support for multiple locales to ensure data authenticity. The library helps developers populate applications with believable test data without relying on manual input or external services.

Target Audience

Java developers and QA engineers who need to generate test data for unit tests, integration tests, or application demos. It's particularly useful for projects requiring locale-specific data or interconnected object graphs.

Value Proposition

Developers choose jFairy for its simplicity, locale support, and ability to generate related data objects. Unlike basic random generators, it provides realistic, culturally appropriate data with a clean API, making it a lightweight alternative to heavier data mocking frameworks.

Overview

Java fake data generator

Use Cases

Best For

  • Generating test data for Java unit and integration tests
  • Populating databases with realistic sample data during development
  • Creating demo data for applications targeting multiple locales
  • Testing user interfaces with fake person and company profiles
  • Ensuring unique values like emails or names in test scenarios
  • Mocking data objects in Spring Boot or other Java-based applications

Not Ideal For

  • High-concurrency applications needing thread-safe data generation across multiple threads
  • Projects targeting locales not in the supported list (e.g., Arabic, Japanese, Russian)
  • Teams requiring out-of-the-box JUnit 5 integration without adding separate extensions
  • Use cases needing generation of complex data types beyond persons and companies, like financial or medical records

Pros & Cons

Pros

Locale-Specific Realism

Supports 12 locales including Polish, Chinese, and Brazilian Portuguese, generating culturally appropriate names and formats as detailed in the locale table.

Related Data Generation

Creates interconnected objects, such as a person with a company email matching their employer's domain, demonstrated in the 'Creating related objects' code example.

Unique Value Enforcement

Provides UniqueFairy and UniqueEnforcer to guarantee uniqueness across emails or names, essential for testing duplicate constraints as shown in the 'Unique values' section.

Simple Fluent API

Offers a straightforward interface like `fairy.person()` for quick integration, illustrated in the basic usage snippets with minimal setup.

Cons

Thread Safety Issues

Fairy objects are not designed for concurrent use; the README explicitly warns that separate instances per thread are required, complicating high-concurrency scenarios.

Limited Locale Coverage

While it supports 12 locales, many common ones like Arabic or Japanese are missing, which may necessitate manual workarounds for global applications.

Pre-1.0 Version Risks

At version 0.8.2, the library is pre-1.0, indicating potential breaking changes that could affect production dependencies and long-term stability.

Frequently Asked Questions

Quick Stats

Stars745
Forks151
Contributors0
Open Issues3
Last commit12 days ago
CreatedSince 2013

Tags

#developer-tools#fake-data#android#java#junit#groovy#data-generation#testing#localization#test-data#maven#test-data-generator

Built With

M
Maven
J
Java

Links & Resources

Website

Included in

Java47.5k
Auto-fetched 1 day ago

Related Projects

Java FakerJava Faker

Brings the popular ruby faker gem to Java

Stars4,909
Forks864
Last commit1 year ago
DatafakerDatafaker

Generating fake data for the JVM (Java, Kotlin, Groovy) has never been easier!

Stars1,759
Forks238
Last commit2 days ago
InstancioInstancio

A library that creates fully populated objects for your unit tests.

Stars1,135
Forks66
Last commit2 days ago
MockneatMockneat

MockNeat - the modern faker lib.

Stars535
Forks47
Last commit3 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub