PS PrestaShop Beginner

DF Test Data Generator: generate PrestaShop test data

Generate, track and purge fake products, customers and orders on PrestaShop 8 and 9.

Updated Module version 1.3.0

DF Test Data Generator fills a PrestaShop 8 or 9 shop with a fictitious but realistic catalog, customers and order history, then deletes exactly what it created. Use it to test a server, a theme or a module on production-like volumes.

Test shops only. Generated data appears as real products, customers and orders. Use the module on a staging shop, a copy or a local environment, never on a shop open to the public.

Installation

  1. In Modules > Module Manager, click Upload a module and send the dftestdata.zip file.
  2. The module creates two tracking tables and a tab under Advanced Parameters > Test data.
  3. The Configure button in the module manager opens the same page.

Requirements: PrestaShop 8.0 to 9.x, PHP GD extension for images (without GD, products are created without images). For product reviews, the native Product Comments module (productcomments) must be installed.

Run a first generation

  1. Pick a preset: Small (50 products, 50 customers, 100 orders), Medium (200, 300, 800), Large (2,000, 5,000, 15,000) or Stress test (20,000, 50,000, 150,000).
  2. Adjust the values if needed. The Estimated volume panel updates live: combinations, image files, order lines and estimated duration.
  3. Tick I confirm this is a test or staging shop, then click Start generation.

Generation runs in 6-second batches. The progress bar, per-stage counters, speed and time left are shown while it runs. The Pause button stops cleanly after the current batch; you can resume right away or later from the history. If you close the page, the generation stops and can be resumed.

The form flags inconsistent settings before you start, for example orders without any generated customer. The button stays disabled until they are fixed.

Available settings

Catalog

  • Categories and brands: spread over 8 universes, brands with a generated logo.
  • Products, % with combinations and max combinations per product (size, shoe size, colour).
  • Packs: native packs of 2 to 4 generated products, priced about 15% below the sum of the items.
  • % virtual products: gift card, digital guide, online workshop, extended warranty.
  • Images per product (0 to 3), % on sale, price and stock ranges, tax rule (by default, the standard rate of the shop country).
  • Options: features for faceted search, indexing for the search engine.

Customers

  • Number of customers, % guests, % with a second address, % business customers.
  • Customer countries: France, United Kingdom, Spain, Germany, Italy, Netherlands, Poland, Portugal. Names, addresses, postcodes and phone numbers follow each country’s format.
  • Business group: business customers join a “Business (test)” group with tax-excluded prices and an adjustable discount, and their addresses carry an intra-community VAT number.

Orders

  • Number of orders and period (from / to), max products per order.
  • Status mix: realistic, mostly delivered or mostly pending.
  • % with a voucher: three test codes (-10, -15, -20%) are created and stay active for one year.
  • % with a customer message: a question and answer exchange with customer service, in the customer’s language.
  • Abandoned carts, over the last 45 days.
  • Options: also order existing catalog products, create invoices for paid orders, order in the customer’s local currency (GBP, PLN, CHF, USD) when the shop offers it.

Reviews and statistics

  • Product reviews: written in the customer’s language, mostly 4 and 5 stars.
  • Visitors: each visitor comes back one to three times from a search engine, a social network, the newsletter or directly. The dashboard then shows visits, conversion rate and traffic sources.

Random seed

Leave empty for an automatic seed. The same seed with the same settings on the same shop produces exactly the same data set.

What orders contain

Orders are written directly into the core tables, without a payment module and without email. Each one has its order lines, taxes, carrier chosen by zone, shipping cost, dated status history, payment and, when the option is on, its invoice. Refunded orders get a credit slip. Validated orders feed the best sellers, and product stock is respected: items in stock are picked first.

Test customers all have an @example.com address and the same password, shown in the How it works panel, so you can test the customer account on the front office.

History and performance report

Each generation appears in the history with its status, volumes and duration. The Details button shows the settings used and the server report: number of records, milliseconds per record and records per minute for each stage, total working time and peak PHP memory. The Use these settings button loads the configuration back into the form.

To compare two servers or two configurations, run the same preset with the same seed on each and compare the ms per record columns.

Purge test data

The Purge button on a history row deletes the data of that generation. The Purge all test data button deletes the data of every generation of the current shop. Only objects created by the module are deleted, in this order: visits, reviews, orders (with invoices, credit slips and messages), carts, vouchers, addresses, customers, business group, products and packs, brands, categories, attribute groups and features. Stock taken by orders on your existing products is given back.

Purge before uninstalling the module. Uninstalling removes the tracking tables, and the remaining data could no longer be identified.

Command line

For very large volumes or an automated environment, run the generator from the shop root:

php modules/dftestdata/cli.php --preset=large --shop=1 --confirm-test-shop
php modules/dftestdata/cli.php --preset=small --orders=2000 --locales=fr,de --confirm-test-shop
php modules/dftestdata/cli.php --resume=12 --shop=1
php modules/dftestdata/cli.php --purge=all --shop=1
php modules/dftestdata/cli.php --list --shop=1
php modules/dftestdata/cli.php --help

Every form value has its option (--products, --customers, --orders, --packs, --visits, --voucher-pct…). The --confirm-test-shop option is required to generate. The performance report is printed at the end of the run.

Multistore

Select a single shop in the multistore context before generating or purging. Each generation is tied to the shop it was started on.

FAQ

The generation stops with errors

After 25 consecutive errors, the generation switches to “Failed” and shows the latest messages. Fix the cause (often a third-party module reacting to product or customer creation), then click Resume in the history.

Reviews are not offered

The field is disabled when the Product Comments module is not installed. Install it, reload the page and the field becomes active.

Orders are not in pounds or zlotys

The local currency is used only when it is installed and active in the shop. Add it under International > Localization > Currencies before generating.

Was this page helpful?

Still stuck? Contact support