Sunday, October 25, 2026 4,350 lists 78,100 records on file
List your app or device

  1. Home
  2. Test Data Generation Tools
  3. Fishery

Fishery

What it is

Fishery is a JavaScript library for preparing objects as test data and for other situations where data needs to be set up. Developers define factories with default values, then use build() to create objects with supplied parameters layered over those defaults. Fishery supports TypeScript with typed factory inputs and return objects, and it can also be used without TypeScript. Factories can define asynchronous onCreate behavior; calling create() performs that work and returns a promise. Other capabilities include sequences, transient parameters, associations, and hooks that run after building or creating an object. Developers can also extend factories with reusable builder methods by subclassing Factory. The repository provides npm and Yarn installation commands for using Fishery as a development dependency. It identifies the library as free software under the MIT license and says it is maintained and funded by thoughtbot, inc. GitHub Issues is listed for reporting bugs and requesting changes. Fishery is presented as useful in tests and elsewhere that JavaScript data needs preparation. The listed Free plan costs nothing.

For and against

For

  • Free software under the MIT license.
  • Supports typed factories in TypeScript.
  • Offers asynchronous creation behavior.
  • Includes associations and lifecycle hooks.
  • Available through npm and Yarn.

Against

  • It is a JavaScript library for object setup.
  • The repository directs support requests to GitHub Issues.

The verdict

Fishery provides factory-based object setup with defaults, overrides and options for asynchronous work. Its MIT license and development-dependency installation make it a focused option for JavaScript data preparation.

Who it suits

Fishery suits JavaScript developers who need reusable object setup for tests or other data-preparation tasks. It supports both TypeScript and projects that do not use TypeScript.

Plans and prices

Free

Free

Free software · MIT license

Every plan, in full

On the record

Async creation
Factories can use create() for asynchronous operations, with behavior configured through onCreate.github.com · read 11 Oct 2026
Audience
The README describes Fishery as useful for tests and other situations where JavaScript data needs to be set up.github.com · read 4 Oct 2026
Build objects
Factories use build() to create objects, and passed parameters overlay the factory's default properties.github.com · read 11 Oct 2026
Create objects
Factories can define onCreate behavior so create() performs asynchronous work and returns a promise.github.com · read 4 Oct 2026
Factory features
The README documents sequences, transient parameters, associations, after-build hooks, and after-create hooks.github.com · read 11 Oct 2026
Install
The README gives npm install --save-dev fishery and yarn add --dev fishery as installation commands.github.com · read 4 Oct 2026
Installation
The README gives npm and Yarn commands for installing Fishery as a development dependency.github.com · read 11 Oct 2026
Integration
The README describes using factories alongside other factories to build associated objects.github.com · read 11 Oct 2026
Intended use
The README says Fishery can be used in tests and anywhere else data needs to be set up.github.com · read 11 Oct 2026
License
The README describes Fishery as free software and links to its license.github.com · read 11 Oct 2026
License details
The repository identifies its license as MIT.github.com · read 11 Oct 2026
Maintainer
The repository says it is maintained and funded by thoughtbot, inc.github.com · read 11 Oct 2026
Purpose
Fishery is a JavaScript library for setting up objects for tests and other data needs.github.com · read 11 Oct 2026
Reusable builders
Factories can be extended with methods to create reusable builder patterns.github.com · read 11 Oct 2026
Security
The repository lists a security policy resource, but the opened page did not provide policy details.github.com · read 11 Oct 2026
Support channel
The repository links to GitHub Issues for reporting bugs and requesting changes.github.com · read 4 Oct 2026
TypeScript
Factories accept typed parameters and return typed objects, and Fishery also works without TypeScript.github.com · read 11 Oct 2026

The review

Fishery is a JavaScript library for constructing dependable test and setup data through reusable object factories. It suits JavaScript and TypeScript developers who need repeatable objects, including related records and asynchronous creation steps. Its strongest case is focused, development-only data preparation; teams wanting a hosted generator or database-oriented tooling should look elsewhere.

Overview

Fishery turns object setup into named factories rather than scattered fixtures. A factory's build() method creates an object from defined defaults, while parameters passed at build time override those defaults. That model keeps common values centralized and lets an individual test change only what matters.

The library is useful in tests and in other JavaScript situations where data must be set up. TypeScript users get typed factory parameters and return objects, while plain JavaScript remains supported. Installation is explicitly development-oriented: the README uses npm install --save-dev fishery or yarn add --dev fishery. Fishery is MIT-licensed free software, maintained and funded by thoughtbot, inc., with GitHub Issues as its channel for bug reports and change requests.

Key features

Defaults, overrides and relationships

Factories provide sensible baseline objects without preventing per-case customization. Sequences support changing values across generated objects, and transient parameters let callers pass temporary inputs without treating them as part of the returned object. Associations allow one factory to work alongside other factories, which is important when tests model related data instead of isolated records.

Asynchronous creation

When setup requires asynchronous work, an onCreate behavior configures create() to return a promise. This separates synchronous object construction from workflows that must await an operation. It is a practical advantage for tests that need both plain values and async-created data, though Fishery remains a library component rather than a service that performs data generation outside your JavaScript process.

Hooks and reusable builders

After-build and after-create hooks provide controlled points for post-processing. Documentation also describes extending factories with reusable builder methods by subclassing Factory. Those facilities can reduce duplication in a larger test suite, but they also add conventions that teams should standardize before many factories accumulate.

Pricing

PlanPriceWhat it means
FreefreeFree software under the MIT license

There is no paid tier, seat charge, quota, trial, or renewal term to weigh. The free plan fits individual developers and teams that can install a development dependency and maintain their own JavaScript test setup. Its trade-off is scope: the offering is the library itself, not a hosted workspace, managed support plan, or usage-based data service.

Platforms

Fishery is distributed for JavaScript projects through npm and Yarn as a development dependency. TypeScript is supported alongside JavaScript. The published installation model points to use inside your project rather than a standalone desktop or hosted application.

Who it's for

Choose Fishery for unit and integration tests that need consistent objects, selective overrides, generated sequences, related records, or asynchronous creation behavior. It is also suitable wherever JavaScript data needs repeatable setup and TypeScript typing is valuable. It is a weaker fit if you need a visual data editor, a remote fake API, or broad cross-language generation without writing JavaScript factories.

Pros and cons

Pros

  • Clear factory workflow: build-time overrides preserve defaults while keeping individual cases concise.
  • Strong test-suite coverage: sequences, transient parameters, associations, and lifecycle hooks address common fixture patterns.
  • Async support: onCreate and create() handle promise-based setup without abandoning the factory model.
  • TypeScript compatibility: typed inputs and outputs improve confidence without excluding JavaScript users.
  • No licensing cost: the MIT license and $0 price remove plan and seat negotiations.

Cons

  • Project-bound delivery: installation is a development dependency, so teams must integrate and maintain it in their own codebase.
  • Not a hosted generator: there is no stated service for remote endpoints, browser-based data work, or managed execution.
  • Builder complexity can grow: subclassing and multiple hooks are powerful, but require team conventions to stay maintainable.

Alternatives

For a broader category view, see the Test Data Generation Tools list.

  • Benerator is the better choice for API, Linux, macOS, self-hosted, or Windows deployments and a freemium generator, though its Community Edition is single-threaded and lacks a full graph.
  • Chance.js suits developers wanting a free MIT-licensed open-source option for API or web use rather than Fishery's factory-and-association model.
  • Snowfakery is a free open-source choice for API, Linux, or self-hosted use with no paid plans or usage limits stated.
  • Tonic Fabricate is for teams preferring a hosted or self-hosted service, with a free tier that includes $5 monthly credits and a $29.00-per-month Plus plan.
  • DummyJSON provides a free fake REST API for API or web scenarios.
  • Faker is a free self-hosted Python package when JavaScript factories are not the requirement.
  • JSON Schema Faker is a free MIT-licensed option for Linux, macOS, self-hosted, web, or Windows use with npm and Bun installation.

Verdict

Fishery is a strong pick for JavaScript or TypeScript teams that want maintainable, typed factories with defaults, overrides, relationships, hooks, and asynchronous creation at no cost. Choose it when data setup belongs inside your test code; look elsewhere when you need a hosted generator, visual database tooling, or a non-JavaScript workflow.

Alternatives to Fishery

Every alternative, ranked