factory_bot

A library for setting up Ruby objects as test data. (by thoughtbot)

Factory_bot Alternatives

Similar projects and alternatives to factory_bot

  1. rockstar

    191 factory_bot VS rockstar

    Home of the Rockstar programming language

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. stb

    stb single-file public domain libraries for C/C++

  4. postgrest

    REST API for any Postgres database

  5. Devise

    Flexible authentication solution for Rails with Warden.

  6. sqlx

    general purpose extensions to golang's database/sql

  7. pgx

    PostgreSQL driver and toolkit for Go

  8. Squirrel

    Fluent SQL generation for golang

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. faker

    A library for generating fake data such as names, addresses, and phone numbers. (by faker-ruby)

  11. Cucumber.js

    35 factory_bot VS Cucumber.js

    Cucumber for JavaScript

  12. pq

    Pure Go Postgres driver for database/sql

  13. rack-mini-profiler

    Profiler for your development and production Ruby rack apps.

  14. django-debug-toolbar

    A configurable set of panels that display various debug information about the current request/response.

  15. PaperTrail

    Track changes to your rails models

  16. jbuilder

    Jbuilder: generate JSON objects with a Builder-style DSL

  17. Humanizer

    Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities

  18. AutoFixture

    AutoFixture is an open source library for .NET designed to minimize the 'Arrange' phase of your unit tests in order to maximize maintainability. Its primary goal is to allow developers to focus on what is being tested rather than how to setup the test scenario, by making it easier to create object graphs containing test data.

  19. Fabrication

    Discontinued This project has moved to GitLab! Please check there for the latest updates.

  20. PaperClip

    Discontinued Easy file attachment management for ActiveRecord

  21. ffaker

    Faker refactored.

  22. Machinist

    Fixtures aren't fun. Machinist is.

  23. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better factory_bot alternative or higher similarity.

factory_bot discussion

Log in or Post with
  1. User avatar
    StanBright
    · 11 months ago
    · Reply

    Review ★★★★★ 9/10

    Factories over fixtures. I've tried both worlds, and I'm always coming back to factories. They are somehow easier to reason about and maintain.

factory_bot reviews and mentions

Posts with mentions or reviews of factory_bot. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-02-01.
  • A library for setting up Ruby objects as test data
    1 project | news.ycombinator.com | 3 May 2025
  • [Rails] How We Reduced API Response Rendering Time by 30%
    10 projects | dev.to | 1 Feb 2025
    Basic Information about props_template is a library that allows lightweight and fast JSON generation, with syntax similar to Jbuilder. It's developed by Thoughtbot, which is familiar with factory_bot.
  • Show HN: Factory-JS – TypeScript dummy object generator for testing
    2 projects | news.ycombinator.com | 29 Mar 2024
    I made Factory-js inspired by factory-bot (https://github.com/thoughtbot/factory_bot), supports Prisma and Drizzle ORM and more. TypeScript is now widely used in both backend and frontend, but there is no de facto standard factory library. I'm developing a web application using Prisma, trpc, and nextjs, but I was struggling with how to write more beautiful and readable back-end tests. That's why I made factory-js.
  • Metaprogramming in Ruby: Advanced Level
    3 projects | dev.to | 30 Jun 2023
    factory_bot: A fixtures replacement
  • Seeding the DB: Best approach?
    3 projects | /r/rails | 7 Jun 2023
    Not sure if you want the execution speed to be faster, or the development speed. If it's development, you can use FactoryBot in a script to generate data easily once you have your factories set up.
  • How could I prevent resetting the database during the test?
    1 project | /r/rubyonrails | 7 Apr 2023
    For instance, thoughtbot/factory_bot.
  • You can’t bribe, threaten, or feed people to get them back in the office
    1 project | news.ycombinator.com | 6 Feb 2023
    > if you're a bunch of tool makers and you all know your audience of tool users then there's no benefit at all to have someone offended by the word "tool" in your workforce.

    It kinda reminds me of the factorygirl -> factorybot [0] story. It was a cute enough name for a technical tool that plays nice among bros, and down the line you end up renaming your package and deal with the drama.

    On brand image, I get your point. I think the corporations doing it best tend to juggle with multiple brands and segment their market accordingly. Then yes, an homogeneous, single focus brand will be more valuable, as it also help to push people outside of the target to your other brands.

    [0] https://github.com/thoughtbot/factory_bot/wiki

  • rspec testing on Windows.
    1 project | /r/ruby | 2 Feb 2023
    Not sure I follow why this question is related to an OS like Windows, but when it comes to RSpec testing with different users, I would use Factory Bot and define a User Factory and add Traits such as Admin & Non Admin and use them in specs with their pre-defined attributes to what they can access based on your User Model and call them within the specs.
  • How to optimize factory creation.
    2 projects | dev.to | 21 Dec 2022
    The factory-bot gem is used in almost in all of our spec files and it make our set up much more easier than when we use fixtures. Here is the tradeoff, the easier the gem is to use, the more likely you’ll end up with some pain to control its usage. And when the times come to tackle slow tests, the best bet you can take is to start digging into you factories because it’s likely they are the primary reason why your test suite is slowing down
  • Efate Test Generator Series: Extending the library
    2 projects | dev.to | 5 Sep 2022
    Efate is actually the second test fixture library I've written and there were several lessons I learned after using the first iteration for several years myself. The first version was influenced a great deal by factor_girl (called factory_bot now), with a heavy dependency on strings to define and create the fixtures. It also wasn't very modular. You couldn't just import a specific fixture, you had to bring in the whole library. And it wasn't very extensible, if you needed to define custom behavior for how a field should be created, it wasn't very pretty.
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 16 May 2025
    InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now. Learn more →

Stats

Basic factory_bot repo stats
32
8,005
7.1
2 days ago

Sponsored
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com

Did you know that Ruby is
the 12th most popular programming language
based on number of references?