Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

This page's audience our own tag's counts — open to see them
–Visits
–Page views
–Clicks to vendors
–Time on page
–Reading now
Clicks to vendors, by tool
  • –
Top countries
  • –
Devices
  • –

– · visits, page views and clicks counted by our own tag, which counts more than our checked analytics; every figure rounded down · how we count

factory_boy review

Free#19 of 28 in Test Data Generation Tools

An open-source Python library for structured ORM fixtures and related test objects.

6.8/10Editor score
factory_boy6.8 Visit factory_boy

Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026

factory_boy is an open-source Python library for developers who need repeatable test objects and application fixtures. Instead of maintaining static fixture files, teams define declarative factories for Python objects and customize fields as needed. It is particularly suited to projects using Django, MongoEngine, Mogo, or SQLAlchemy, with support for related objects and foreign-key generation.

Its main strength is the depth of its factory model. Developers can choose build, create, or stub instantiation strategies, generate objects in batches, and compose nested factories with SubFactory. Faker integration adds realistic randomized values, while ORM-specific factory classes can save generated objects through the relevant framework or database session. This makes factory_boy a practical fit for tests that need connected object graphs rather than isolated records.

The trade-off is focus. factory_boy is primarily an application-fixture library, with deployment centered on self-hosted use inside a Python codebase. It fits teams that want programmable, framework-aware test data generation and are comfortable defining factories in code. Teams seeking a standalone platform for broad data operations, hosted workflows, or a wider range of database connectors should choose a different category of tool. For Django and supported Python ORM projects, factory_boy keeps test-object creation close to the models and sessions that consume it.

factory_boy pros and cons

  • Where it wins
    • Declarative factories support nested and related objects.
    • Build, create, stub, and batch generation strategies.
    • Integrates with Django, MongoEngine, Mogo, SQLAlchemy, and Faker.
  • Where it doesn't
    • Focused on Python application fixtures rather than standalone data generation.
    • Requires self-hosted use within a development environment.
    • Database support centers on selected Python ORM integrations.

factory_boy fact sheet, pricing and score →

Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.

Last updated · How we research and update