factory_bot VS ffaker

Compare factory_bot vs ffaker and see what are their differences.

ffaker

Faker refactored. (by ffaker)
Our great sponsors
  • PopRuby - Clothing and Accessories for Ruby Developers
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
factory_bot ffaker
29 0
7,868 1,541
0.0% 0.6%
7.7 6.9
3 days ago about 1 month ago
Ruby Ruby
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

factory_bot

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 2023-06-30.
  • 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 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.
  • Get help from thoughtbot for free (mentoring / office hours)
    4 projects | /r/ruby | 7 Jul 2022
    I work at thoughtbot, you might know us for our open source work like administrate, factory_bot or shoulda-matchers.
  • Gnarly Learnings From June 2022
    2 projects | dev.to | 22 Jun 2022
    As we continue to level-up our skillsets as developers in Rails, the utility of POROs (Plain Old Ruby Objects) becomes more apparent and appealing. Sometimes, the business object(s) you create do not require persistent storage to a database and are, therefore, outside of the scope of an ORM (Object Relational Mapper) like ActiveRecord. But how do we maintain simplicity in our test suite and continue to leverage helpful testing libraries like FactoryBot without one? This instructional article explores how to implement factories for POROs including common pitfalls, building nested resources, and factory linting.
  • Test Data Factories in Javascript
    4 projects | dev.to | 14 May 2022
    In the ruby world I'm a fan of factory_bot for generating objects that will serve as test data in my unit tests. I had a bit of time to kill this evening and thought it would be fun to implement the subset of the functionality that I use in factory_bot in javascript to see how I would approach it.
  • `method_missing': undefined method `has_paper_trail'
    2 projects | /r/ruby | 18 Mar 2022
    redd@tanya:~/galaxy$ rails s [DEPRECATED] Bootsnap's `autoload_paths_cache:` option is deprecated and will be removed. If you use Zeitwerk this option is useless, and if you are still using the classic autoloader upgrading is recommended. [DEPRECATED] Bootsnap's `disable_trace:` option is deprecated and will be removed. If you use Ruby 2.5 or newer this option is useless, if not upgrading is recommended. DEPRECATION WARNING: The factory_girl gem is deprecated. Please upgrade to factory_bot. See https://github.com/thoughtbot/factory_bot/blob/v4.9.0/UPGRADE_FROM_FACTORY_GIRL.md for further instructions. (called from at /home/redd/galaxy/config/application.rb:9) => Booting Puma => Rails 5.2.7 application starting in development => Run `rails server -h` for more startup options /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.2.7/lib/active_record/type.rb:27: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.2.7/lib/active_record/type/adapter_specific_registry.rb:9: warning: The called method `add_modifier' is defined here /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-5.2.7/lib/active_model/type/integer.rb:13: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-5.2.7/lib/active_model/type/value.rb:8: warning: The called method `initialize' is defined here /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.2.7/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb:12: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-5.2.7/lib/active_model/type/value.rb:8: warning: The called method `initialize' is defined here Exiting Traceback (most recent call last): 120: from bin/rails:3:in `' 119: from bin/rails:3:in `load' .... 8: from /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-5.2.7/lib/active_support/dependencies.rb:661:in `new_constants_in' 7: from /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-5.2.7/lib/active_support/dependencies.rb:476:in `block in load_file' 6: from /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:39:in `load' 5: from /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:39:in `load' 4: from /home/redd/galaxy/app/models/users/user.rb:1:in `' 3: from /home/redd/galaxy/app/models/users/user.rb:2:in `' 2: from /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/attr_encrypted-3.1.0/lib/attr_encrypted/adapters/active_record.rb:131:in `method_missing_with_attr_encrypted' 1: from /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/attr_encrypted-3.1.0/lib/attr_encrypted.rb:306:in `method_missing' /home/redd/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-5.2.7/lib/active_record/dynamic_matchers.rb:22:in `method_missing': undefined method `has_paper_trail' for # (NoMethodError) Did you mean? has_attached_file
  • Five Easy to Miss PostgreSQL Query Performance Bottlenecks
    4 projects | news.ycombinator.com | 18 Jan 2022
  • It really be like that though
    9 projects | /r/ProgrammerHumor | 6 Nov 2021
    Here is an example from Factory Bot itself, which includes embedded Ruby (in this case):

ffaker

Posts with mentions or reviews of ffaker. We have used some of these posts to build our list of alternatives and similar projects.

We haven't tracked posts mentioning ffaker yet.
Tracking mentions began in Dec 2020.

What are some alternatives?

When comparing factory_bot and ffaker you can also consider the following projects:

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

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

Machinist - Fixtures aren't fun. Machinist is.

Forgery - Easy and customizable generation of forged data.

FactoryTrace - Simple tool to maintain factories and traits from FactoryBot

Fake Person - Create some fake personalities

TapReportParser - TAP Report Parser

PaperTrail - Track changes to your rails models