Emulator Data Management

Seed the emulator with fixture data, clear data per-service, and toggle Cloud Functions triggers.

Overview

Data Management for the emulator lets you quickly reset to known states during development. Seed test data from files, clear services individually, and control whether Cloud Functions triggers fire during data operations.

Seeding from Fixture Files

Populate the emulator with test data from a JSON fixture file:

  1. Click the Import button in the emulator panel.
  2. Select a JSON fixture file from the file picker.
  3. Stackpane loads the data into the emulator.

Fixture files should contain structured data matching the format expected by the emulator’s import API. This is the same format produced by Stackpane’s Firestore export feature, making it easy to create fixtures from real data.

Clearing Data

Reset emulator data using the clear menu:

Clear All Data

Resets all emulator services at once — Firestore documents, Auth users, and Storage files are all removed. A confirmation dialog is shown before the destructive operation.

Clear Individual Services

Selectively clear data for a single service:

  • Clear Firestore — removes all collections and documents
  • Clear Auth — removes all user accounts
  • Clear Storage — removes all files and folders

This is useful when you need to reset only one service while preserving data in others.

Toggling Cloud Functions Triggers

When seeding data or running tests, you may want to prevent Cloud Functions from firing on write events:

  1. Use the Toggle Triggers control in the emulator panel.
  2. When triggers are disabled, writes to Firestore or Auth do not invoke Cloud Functions.
  3. When triggers are enabled, Cloud Functions fire normally.

This is particularly useful when seeding large amounts of test data — disabling triggers avoids unnecessary function executions and speeds up the seeding process.

Typical Development Workflow

  1. Start the emulator from Stackpane.
  2. Disable triggers to prevent side effects during seeding.
  3. Seed the emulator from a fixture file with your test data.
  4. Re-enable triggers for normal development.
  5. Test your application against the seeded data.
  6. Clear and re-seed as needed to reset to a clean state.
  7. Save a snapshot if you want to return to this state later.

Tips

  • Keep fixture files in your project repository so the entire team uses the same test data
  • Use the export feature on a production collection to create realistic fixture files
  • Disable triggers before large seed operations to avoid Cloud Functions quota consumption in the emulator