What is Dummy Data? Mock Data, Fake Data, Test Data — Explained
Developers use the terms dummy data, mock data, fake data, test data, and seed data interchangeably — but they actually mean different things in different contexts. This guide clarifies each term and explains when each type is appropriate.
The Short Definitions
| Term | What It Means | When Used |
|---|---|---|
| Dummy data | Placeholder data passed to satisfy an interface but never actually used | Unit tests — filling required parameters |
| Mock data | Pre-programmed data that simulates a real system's response | API mocking, test doubles |
| Fake data | Realistic-looking but invented data — names, emails, addresses that don't belong to real people | Dev databases, UI prototypes |
| Test data | Data specifically crafted to test a particular behavior or edge case | QA, automated testing |
| Seed data | Initial data inserted into a database to bring it to a known state | Development and staging environments |
Dummy Data
In software testing, a dummy object (and by extension dummy data) is something passed around but never actually used. The classic example is a required parameter that your test doesn't care about:
// We're testing the cart total calculation.
// The user's email doesn't affect the calculation —
// it's dummy data: required by the function signature but irrelevant to the test.
const dummyUser = { id: 1, email: 'x@x.com', name: 'Test' };
const cart = new ShoppingCart(dummyUser);
cart.addItem({ price: 29.99, qty: 2 });
expect(cart.total()).toBe(59.98);In everyday developer usage, "dummy data" has broadened to mean any non-real data — fake names, placeholder emails, invented addresses. When someone says "I need some dummy data for my dev database," they mean fake data, not technically dummy objects in the testing-pattern sense.
Mock Data
A mock in testing replaces a real dependency (database, API, service) with a controlled substitute that returns pre-programmed responses. Mock data is the data those mocks return.
// The mock replaces a real API call.
// The data it returns (the user object) is mock data.
jest.mock('./api/users', () => ({
fetchUser: jest.fn().mockResolvedValue({
id: 'abc-123',
name: 'Ayesha Rahman',
email: 'ayesha@example.com',
role: 'admin'
})
}));Mock data is intentionally minimal — just enough to make the test pass. It usually doesn't need to look realistic because it's testing behavior, not presentation.
Fake Data
Fake data looks realistic. It's the difference between user1@test.com and ayesha.rahman94@gmail.com. Both are invented, but the second one looks like a real email address a real person might have.
Fake data matters because:
- UI development — components that look fine with "Test User" often have layout issues with "Bartholomew Christophersen-Wellington"
- Privacy — you can't use real customer emails or names in a dev environment without GDPR risk
- Demo credibility — stakeholder demos with placeholder text look unprofessional; realistic data looks like the real product
Tools like Dummy JSON Generator and Faker.js generate fake data — realistic-looking but entirely invented.
Test Data
Test data is specifically crafted to verify a particular behavior. Unlike fake data (which is randomly generated to look real), test data is deliberately constructed to cover requirements and edge cases.
// Test data for an email validation function —
// each case is deliberately chosen to test a specific rule
const testCases = [
{ input: 'user@example.com', expected: true }, // valid
{ input: 'user@', expected: false }, // missing domain
{ input: '@example.com', expected: false }, // missing local part
{ input: 'user@exam ple.com', expected: false }, // space in domain
{ input: 'user+tag@example.com', expected: true }, // plus addressing
{ input: 'a'.repeat(255) + '@example.com', expected: false }, // too long
];Good test data is exhaustive for the boundary conditions that matter, not just random samples.
Seed Data
Seed data is inserted into a database to bring it to a known starting state. It's used in development and staging environments so every developer on a team has the same baseline data when they start.
// A Prisma seed script that populates the dev database
// with realistic fake data generated from Dummy JSON Generator
import { PrismaClient } from '@prisma/client';
import users from '../seed-data/users.json';
const prisma = new PrismaClient();
async function main() {
await prisma.user.createMany({ data: users, skipDuplicates: true });
}
main().finally(() => prisma.$disconnect());Seed data is typically fake data (realistic-looking) rather than test data (edge-case-focused), because the goal is to simulate a realistic populated state, not to test specific behaviors.
Which Type Do You Actually Need?
| Your Situation | Type You Need | Best Tool |
|---|---|---|
| Populating a dev database | Seed data (fake) | Dummy JSON Generator + Prisma |
| Building a UI without a backend | Fake data | Dummy JSON Generator |
| Unit/integration testing | Mock data + test data | Faker.js + hand-written edge cases |
| Load / performance testing | Fake data at volume | Dummy JSON Generator (1M records) |
| Stakeholder demo | Fake data | Dummy JSON Generator |
Need to generate realistic fake data right now? Open the tool — no signup, no setup, up to 1 million records in JSON, CSV, or SQL.