eco-faker Generates Relational E-Commerce Test Data With Two Lines of Code
A developer has released eco-faker, an open-source npm package designed to generate realistic, relationally consistent fake data for e-commerce applications. Unlike standard fake-data libraries that produce unrelated random objects, eco-faker uses a stateful system that links users, carts, orders, shipments, and returns into a coherent dataset. The tool ensures financial accuracy — subtotals, tax, and shipping sum correctly to the cent — and maintains logical timelines so events like shipments cannot precede their parent orders. Users can generate data via a CLI or JavaScript API, with support for SQL, CSV, and JSON output formats, as well as built-in scenario presets such as 'black-friday' and 'supply-chain-crisis'. Additional utilities include a live REST API server, a dataset linter for integrity checks, and a fuzzing tool to expose gaps in validation logic.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in