Faker
The Faker tab generates test data for your collections. Use it to fill your database with sample records during development and testing. Go to Settings → Faker to access these settings.
Faker configuration
| Setting | Description |
|---|---|
| Enable Faker | Turn on to enable test data generation. When off, no data is generated. |
Collections
When Faker is enabled, each collection shows configuration options:
| Column | Description |
|---|---|
| Collections | The collection name |
| Amount of Records | Number of sample records to generate (default: 10) |
| Truncate | When turned on, clears existing data before generating |
Amount of records
Set how many sample records to generate for each collection:
- Development: 10–50 records for quick testing
- Performance testing: 100–1000+ records to simulate load
- Demo purposes: 20–50 records for realistic presentations
Truncate
When enabled, Faker will:
- Delete all existing records in the collection.
- Insert the specified number of new records.
warning
Truncate deletes all existing data in the collection before generating. Don't use it if you have manually entered records you want to keep.
How it works
- Set the Amount of Records for each collection.
- Enable or disable Truncate based on your needs.
- Faker uses your field settings to generate realistic data:
- Faker Types defined on each field determine the data format
- Required fields are always populated
- Relationships respect foreign key constraints
Best practices
| Scenario | Recommendation |
|---|---|
| Fresh development | Enable Truncate, set 10–20 records |
| Adding more test data | Disable Truncate, set desired amount |
| Performance testing | Enable Truncate, set 500+ records |
| Preserving manual data | Disable Truncate, add only new records |
tip
Faker output quality depends on the Faker Type set on each field. Set Faker Types in Collections → Fields → Common Settings.