6 min readMar 29, 2026by jakub

Catalog Generator

Open Sourcegithub.com/qoliber/catalog-generator (MIT License)

A Magento 2 module for generating realistic test catalogs from YAML configuration files. Generate hundreds of thousands of products with categories, MSI inventory, custom attributes, tier prices, catalog rules, and more — all using high-performance direct SQL for speed.

Why?

Performance testing, indexer benchmarking, and demo environments all need realistic catalog data. Magento's built-in performance toolkit is limited and slow. Catalog Generator creates a complete, realistic catalog in minutes — not hours — using direct SQL inserts with batched operations and low memory usage.

Features

  • YAML-driven — define your entire catalog in a single configuration file
  • All product types — simple, configurable, bundle, and grouped with realistic variants
  • MSI Multi-Source Inventory — configurable sources, stocks, sales channels, and per-source stock assignment
  • Custom EAV attributes — dropdown and multiselect with configurable options, searchable/filterable flags
  • Custom product options — dropdown, radio, checkbox, multi-select with realistic labels and random pricing
  • Tier prices — percentage-based with configurable levels
  • Catalog price rules — random discounts linked to all websites and customer groups
  • Realistic names — products get names like "Alpine Merino Jacket", categories use 100+ real department names
  • Multi-website / multi-store — websites, store groups, and store views with per-website root categories
  • Customer groups — configurable additional groups beyond Magento defaults
  • URL rewrites — automatic URL key and rewrite generation for products and categories
  • Randomized product images — placeholder image generation
  • High performance — direct SQL inserts in 5,000-row batches, ~250MB peak memory for 1M+ products
  • Progress tracking — Symfony progress bars with %, elapsed time, ETA, and memory usage

Quick Start

Bash
composer require qoliber/m2-catalog-generator
bin/magento module:enable Qoliber_CatalogGenerator
bin/magento setup:upgrade

Generate a catalog:

Bash
bin/magento qoliber:catalog:generate vendor/qoliber/m2-catalog-generator/_samples/small.yml
Destructive Operation

This command completely wipes the existing product catalog and related tables before generating new data. Only use in development or testing environments. The module requires developer mode to run.

Sample Configurations

The module ships with 5 ready-to-use YAML configurations in the _samples/ directory, ranging from quick validation to million-product stress tests:

test.yml — Quick Validation

Minimal catalog for verifying the module works correctly.

EntityCount
Categories~7
Simple products20
Configurable products3 (+ children)
Bundle products3
Grouped products3
Websites1 (2 store views)
Customer groups2 additional
MSI sources/stocks2 / 2
Custom attributes3 (2 dropdown + 1 multiselect)
Catalog rules2
Bash
bin/magento qoliber:catalog:generate vendor/qoliber/m2-catalog-generator/_samples/test.yml

small.yml — Development

A practical catalog for everyday development and feature testing.

EntityCount
Categories~100
Simple products500
Configurable products50 (+ children)
Bundle products50
Grouped products50
Websites1 (2 store views)
Customer groups4 additional
MSI sources/stocks2 / 2
Custom attributes5 (3 dropdown + 2 multiselect)
Custom options50 products (3 options each)
Tier price levels5
Catalog rules3
Bash
bin/magento qoliber:catalog:generate vendor/qoliber/m2-catalog-generator/_samples/small.yml

medium.yml — Integration Testing

Multi-website catalog for testing cross-store features, MSI, and indexer performance.

EntityCount
Categories~600
Simple products5,000
Configurable products500 (+ children)
Bundle products200
Grouped products200
Websites2 (3 store views each)
Customer groups6 additional
MSI sources/stocks3 / 2
Custom attributes8 (5 dropdown + 3 multiselect)
Custom options200 products (3 options each)
Tier price levels5
Catalog rules3
Bash
bin/magento qoliber:catalog:generate vendor/qoliber/m2-catalog-generator/_samples/medium.yml

large.yml — Performance Benchmarking

The catalog used for Optimized Indexes benchmarks — 131K+ total products across 2 websites with 6 store views.

EntityCount
Categories~615
Simple products75,000
Configurable products3,000 (+ 27,000 children)
Bundle products1,500 (+ 18,000 children)
Grouped products750 (+ 6,000 children)
Total products~131,250
Websites2 (3 store views each)
Customer groups8 additional
MSI sources/stocks4 / 2
Custom attributes30 (15 dropdown + 15 multiselect)
Custom options500 products (4 options each)
Tier price levels3
Catalog rules2
Bash
bin/magento qoliber:catalog:generate vendor/qoliber/m2-catalog-generator/_samples/large.yml

big.yml — Stress Testing

Massive catalog for stress-testing indexers, search engines, and infrastructure limits. Over 1 million total products.

EntityCount
Categories~800
Simple products100,000
Configurable products10,000 (+ ~160,000 children)
Bundle products5,000 (+ ~80,000 children)
Grouped products5,000 (+ ~40,000 children)
Total products~1,120,000+
Websites3 (3 store views each)
Customer groups10 additional
MSI sources/stocks5 / 3
Custom attributes20 (12 dropdown + 8 multiselect)
Custom options1,000 products (5 options each)
Tier price levels4
Catalog rules4
Bash
bin/magento qoliber:catalog:generate vendor/qoliber/m2-catalog-generator/_samples/big.yml
Resource Requirements

Image generation is disabled in large.yml and big.yml for performance. The big.yml config generates 1M+ products — ensure sufficient MySQL max_allowed_packet and innodb_buffer_pool_size.

YAML Configuration Reference

A configuration file defines your entire catalog. Here is the structure with all available options:

YAML
clean_before_run: true      # Wipe existing catalog data before generating
prefix: 'qoliber'           # Prefix for generated entity names

entities:
  category:
    count: "1/2/5/10"       # Category tree: 1 root / 2 L1 / 5 L2 / 10 L3
    attributes:
      name: "resolver:category_name"  # Use realistic category names
      include_in_menu: 1
      is_active: 1
      is_anchor: 1
    tasks:
      - 'category:generate_url_attributes'

  website:
    count: 2                 # Number of websites
    stores_per_website: 3    # Store views per website
    tasks:
      - 'category:generate_urls'
      - 'website:assign_sales_channel'

  customer_group:
    count: 8                 # Additional groups beyond Magento defaults

  stock:
    msi_sources_count: 4     # MSI inventory sources
    msi_stock_count: 2       # MSI stocks (linked to sources automatically)
    tasks:
      - 'stock:link_sources'

  custom_attributes:
    dropdown:
      count: 15                        # Number of dropdown attributes
      options_per_attribute: 8         # Options per attribute
      product_assignment_percent: 30   # % of products that get values
      searchable: true
      filterable: true
    multiselect:
      count: 15
      options_per_attribute: 10
      product_assignment_percent: 20
      searchable: true
      filterable: true

  product:
    types:
      simple:
        count: 75000
      configurable:
        count: 3000
        options: [2, 3]      # 2 attributes x 3 options = 6 children each
      bundle:
        count: 1500
        options:              # Bundle option types and children per type
          checkbox: 3
          select: 3
          multi: 3
          radio: 3
      grouped:
        count: 750
        options: [8]          # 8 child products per grouped
    attributes:
      name: "resolver:name"  # Realistic product names
      price: 499
      status: 1
      tax_class_id: 2
      visibility: 4
      weight: 1.00
    custom_options:
      count: 500                  # Number of products to get custom options
      options_per_product: 4
      values_per_option: 4
    tier_prices:
      levels: 3               # Tier price levels (e.g., 3 = discounts at qty 2/5/10)
    tasks:
      - 'product:assign_to_categories'
      - 'product:assign_to_type_categories'
      - 'product:assign_custom_attributes'
      - 'product:assign_custom_options'
      - 'product:assign_tier_prices'
      - 'product:assign_stock'
      - 'product:assign_to_websites'
      - 'product:generate_images'    # Comment out for large catalogs
      - 'product:generate_url_keys'
      - 'product:generate_urls'

  catalog_rules:
    count: 2
    discount_type: by_percent
    discount_range: [5, 30]   # Random discount between 5-30%

  commands:
    tasks:
      - 'command:indexer:reindex'
      - 'command:cache:flush'

Category Count Format

The count field uses a slash-separated format defining the tree structure:

"1/2/5/10" = 1 root → 2 level-1 → 5 level-2 → 10 level-3

The first level creates one root category per website. Total categories = product of all levels across the tree.

Resolver System

Use resolver:name for realistic product names and resolver:category_name for category names:

  • Product names: generated from adjective + material + product pools (e.g., "Alpine Merino Jacket", "Cedar Sunglasses")
  • Category names: drawn from 100+ real department names (e.g., "Electronics", "Garden & Patio", "Men's Fashion")

Requirements

  • Magento Open Source, Mage-OS, or Adobe Commerce 2.4.6+
  • PHP 8.1+
  • Developer mode only — the module refuses to run in production mode

Contributing

This is an open-source project under the MIT License. Contributions, bug reports, and feature requests are welcome on GitHub.

Was this page helpful?