Relmock Guide

Build

Generating data

Relmock fills your tables with records that look real and fit together: an order points at a user who exists, a user's email matches their name, and a delivery date comes after the order date.

Generate all tables

The Generate data dialog with the locale, a Same data every time option and a row count per table

On the Schema page, click Generate data. Choose:

  • Rows per table, up to 50 each time. With a "children per parent" setting on a relation, the child table's count follows that rule instead.
  • Names and places from: the language and country of names, cities, addresses and phone numbers.
  • Same data every time: the same tables and settings give the same records, which helps tests that look for exact values.
Note
Generating replaces the current records, including ones your app created through the API. The dialog says how many.

Work with records

The Tables page: the orders records with user names next to each user_id, and order 3 open on the right with its fields and the records that point at it

The Tables page (first item in the left rail) shows a table's records. You can sort, search and filter, edit a record on the right, Insert row, or select rows to delete them. Foreign keys show the linked record's name; click to open it. Referenced by lists the records pointing at this one.

  • Generate on this page regenerates one table and keeps the links from other tables valid.
  • The menu (…) has Reset every table to seed, which puts back the records of the last generation or import, and Clear, which applies the delete rules.

Field settings

Generator settings for the status field: a list of four values with weights, a Changes over time section, and rules for writes with Required and Only these values checked

In the table editor, the settings button next to a field opens what it generates and what writes must follow. A live sample on the right updates as you change things.

SourceUse it for
GeneratedValues of the field's type, with a range (numbers, dates like -90d to now), decimals or a word count.
AIRealistic text the AI writes once and Relmock reuses. See below.
List of valuesValues like pending, paid, refunded, with weights: 70 and 5 make "paid" common and "refunded" rare.
PatternCodes like ORD-#####: # is a digit, ? a letter, * either.
FormulaA value computed from the record: {{ record.quantity * record.unit_price }}.
Fixed valueThe same value in every record.

Every field can also have a share of empty values (null %) and unique values.

Rules for writes

The same dialog sets what your API accepts: required, only these values, a range, a step, a minimum or maximum length, a regular expression and a default for creates that leave the field out. A write that breaks a rule answers 422 with the field and the reason. Generated records always follow these rules.

Values that change over time

A field with a list of values can move through them on its own, like a real order: pending → paid after 2 minutes → shipped after 1 hour. Add steps under Changes over time, with a chance for each when there are several ways forward. Optionally write the time of the step into a date field, such as paid_at. To test it without waiting, move the mock clock forward.

AI-written values

Some text is hard to fake: product names that fit their category, reviews, support tickets. Choose the AI source and give a hint, such as "products of a pet store". The AI writes a pool of rows once (50 by default), and every later generation picks from that pool, with no further AI call. Rows fit the record's other fields: a description matches its category. You can view and edit the pool from the same dialog.

Free plan
5 AI value pools a day. If the AI can't be reached, generation still runs with ordinary values and tells you why.