← Graph

Factory Cascades

concept 2 connections

Test-slowness anti-pattern surfaced by test-prof: a Factory builds one entity that references another that references another, so each test implicitly constructs the entire domain graph. Mitigations include removing associations from factories, making them optional, creating relation-free variants, and using create_default to reuse an already-created object instead of rebuilding it.

category
practice
about
Factory Cascades concept
Discussed as a major source of slow test suites surfaced by test-prof.
tool test-prof
related_to
Factory Cascades concept
test-prof's FactoryProf component profiles and diagnoses Factory Cascades.

Provenance

Read by
4 extractions