awesome-repositories.com
Blog
MCP
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
thoughtbot avatar

thoughtbot/factory_bot

0
View on GitHub↗
8,176 Stars·2,556 Forks·Ruby·MIT·7 Aufrufethoughtbot.com↗

Factory Bot

FactoryBot is a Ruby library for generating complex test objects and their associations, serving as a dynamic alternative to static fixture files. It provides a system for defining reusable data blueprints with default attributes and inheritance to produce consistent test records.

The tool distinguishes itself through flexible instantiation strategies, allowing users to control whether objects are persisted to a database, built in memory, or created as stubs. It manages data uniqueness via a sequence generator for incremental values and uses traits to bundle shared attributes into reusable modules that can be mixed into objects during creation.

The project covers broad capability areas including automated object association management, bulk record generation, and lifecycle hooks for executing custom logic during the build process. It also includes utilities for validating factory definitions and tracking execution through instrumentation.

Features

  • Test Data Factories - Implements a comprehensive system for defining reusable data blueprints and factories to generate consistent test environments.
  • Test Data Blueprinting - Provides a system for creating reusable templates with default attributes and nested inheritance to reduce repetition.
  • Variant Definitions - Allows defining multiple factories for a single class and using inheritance to share common attributes across different roles.
  • Test Attribute Grouping - Bundles shared attributes into reusable traits to mix them into objects during instantiation.
  • Automated Association Generation - Automatically resolves and creates linked test objects based on class associations.
  • Automatic Association Linking - Links factories together to automatically create related objects through implicit naming and polymorphic relationships.
  • Test Object Associations - Automatically links related Ruby objects through implicit naming and polymorphic relationships during test data generation.
  • Persistence Strategies - Provides flexible strategies to control whether objects are persisted to a database, built in memory, or stubbed.
  • Blueprint Inheritance - Enables factories to inherit attributes from parent definitions to create specialized object variants.
  • Test Data Generators - Creates complex objects and their associations for testing to replace the need for static fixture files.
  • Attribute Traits - Bundles shared attributes into reusable traits that can be dynamically added to objects during instantiation.
  • Dynamic Object Instantiation - Provides a system for creating complex test objects from reusable blueprint definitions and hierarchical configurations.
  • Automated Test Data Generation - Creates flexible and reusable object blueprints to replace static fixture files in a testing environment.
  • Database Object Mocking - Produces persisted or in-memory Ruby objects with complex associations for use in automated test suites.
  • Test Instantiation Strategies - Provides flexible strategies to control whether test objects are persisted to a database, built in memory, or created as stubs.
  • Testing Object Emulation - Creates complex Ruby objects and their associations for testing as a dynamic alternative to static fixture files.
  • Test Sequence Generation - Produces incremental or cycling values for attributes to ensure data uniqueness across multiple test records.
  • Sequential Value Generation - Maintains internal counters to provide incremental or cycling values for attributes to prevent data duplication.
  • Dynamic Templates - Provides a simple syntax for creating dynamic blueprints that replace static fixtures with generated data.
  • Lifecycle Callbacks - Implements build and creation callbacks to execute custom setup logic at specific stages of the object lifecycle.
  • Alphanumeric Sequence Generation - Includes a sequence generator to produce incremental or cycling values, ensuring attribute uniqueness across test records.
  • Bulk Test Record Generation - Produces arrays of objects in bulk using list methods while allowing attribute overrides for individual items.
  • Composite Generation Strategies - Generates test objects using various strategies, including persisted instances and attribute hashes.
  • Test Data Isolation - Provides unique and consistent data records for tests to ensure isolation and prevent data collisions.

Star-Verlauf

Star-Verlauf für thoughtbot/factory_botStar-Verlauf für thoughtbot/factory_bot

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Open-Source-Alternativen zu Factory Bot

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Factory Bot.
  • factoryboy/factory_boyAvatar von FactoryBoy

    FactoryBoy/factory_boy

    3,799Auf GitHub ansehen↗

    Factory Boy is a dynamic test fixture framework and data generation tool for Python. It serves as a replacement for static fixtures by providing a system to create complex Python objects and database models through programmable blueprints. The project differentiates itself by offering specialized integration with Object Relational Mappers to manage persistence within database sessions. It enables the creation of complex object hierarchies using sub-factories and recursive composition to resolve dependent related objects. The framework provides capabilities for synthesizing realistic random d

    Pythondjangofixtureshacktoberfest
    Auf GitHub ansehen↗3,799
  • nelmio/aliceAvatar von nelmio

    nelmio/alice

    2,539Auf GitHub ansehen↗

    Alice is a PHP test data generator and fixture library used to automate the creation of large sets of fake objects and entities. It functions as an object hydrator and random data provider, allowing users to define the structure and attributes of dummy test data in markup or arrays to simulate specific application states. The library distinguishes itself through a template-based system that supports fixture inheritance to reduce data duplication. It utilizes a flexible instantiation model that allows for custom factory integration, method invocation, and property hydration via reflection or c

    PHPaliceexpression-languagefaker
    Auf GitHub ansehen↗2,539
  • thomhurst/tunitAvatar von thomhurst

    thomhurst/TUnit

    3,744Auf GitHub ansehen↗

    TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source generation for test discovery and mock creation, ensuring compatibility with Native AOT and IL trimming by eliminating the need for runtime reflection and proxies. The framework provides specialized capabilities for integration testing, including the management of distributed application lifecycles, isolated database schemas, and the correlation of telemetry and logs across process boundaries via OTLP. It also includes an HTTP testing utility to intercept network exchanges and mock AP

    C#csharpdotnettest
    Auf GitHub ansehen↗3,744
  • codeigniter4/codeigniter4Avatar von codeigniter4

    codeigniter4/CodeIgniter4

    5,924Auf GitHub ansehen↗

    CodeIgniter is a PHP web framework built on the Model-View-Controller pattern, designed for building full-stack web applications. It provides a lightweight toolkit with minimal configuration, organizing application logic into controllers, models, and views for clean separation of concerns. The framework includes a fluent query builder for constructing SQL statements programmatically, PSR-4 autoloading with namespace mapping, and a service-based dependency injection container for managing shared class instances. The framework distinguishes itself through its comprehensive set of built-in tools

    PHPcodeignitercodeigniter4framework-php
    Auf GitHub ansehen↗5,924
Alle 30 Alternativen zu Factory Bot anzeigen→

Häufig gestellte Fragen

Was macht thoughtbot/factory_bot?

FactoryBot is a Ruby library for generating complex test objects and their associations, serving as a dynamic alternative to static fixture files. It provides a system for defining reusable data blueprints with default attributes and inheritance to produce consistent test records.

Was sind die Hauptfunktionen von thoughtbot/factory_bot?

Die Hauptfunktionen von thoughtbot/factory_bot sind: Test Data Factories, Test Data Blueprinting, Variant Definitions, Test Attribute Grouping, Automated Association Generation, Automatic Association Linking, Test Object Associations, Persistence Strategies.

Welche Open-Source-Alternativen gibt es zu thoughtbot/factory_bot?

Open-Source-Alternativen zu thoughtbot/factory_bot sind unter anderem: factoryboy/factory_boy — Factory Boy is a dynamic test fixture framework and data generation tool for Python. It serves as a replacement for… nelmio/alice — Alice is a PHP test data generator and fixture library used to automate the creation of large sets of fake objects and… thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… codeigniter4/codeigniter4 — CodeIgniter is a PHP web framework built on the Model-View-Controller pattern, designed for building full-stack web… fzaninotto/faker — Faker is a PHP library for creating realistic synthetic data used for testing, prototyping, and populating database… hypothesisworks/hypothesis — Hypothesis is a Python property-based testing library and data generation engine. It enables the discovery of edge…