Skip to main content

Import & Export Configuration

Service simulation configurations can be exported to a .mockconfig.json file and imported back — useful for sharing setups across teams, backing up configurations, or version-controlling your simulations.

Naming note. The .mockconfig.json extension is a legacy name: the feature is called Service Simulation. "Mock" and "simulation" refer to the same capability throughout the product.

What it does​

An exported file captures one server's saved responses (status codes, headers, bodies, delays, conditions, SOAP fault settings, and streaming frames) together with the server identity. Importing replays those responses into a server using a chosen conflict strategy.

When to use​

  • Share with a teammate — export and let them import.
  • Back up / restore — export before major changes; re-import to roll back.
  • Version control — commit the .mockconfig.json to Git and re-import on another machine.
  • CI/CD — import a configuration from the CLI as part of an automated pipeline.

Export (from Studio)​

  1. In the Service Simulation view, select the server.
  2. Click Export.
  3. In the Export Configuration window, enter a Description (optional) and click Export.
  4. Choose a destination file in the save dialog. The suggested name is <ServerName>.mockconfig.json and the file type filter is *.mockconfig.json.
  5. The file is written and a notification shows the path (click it to open the containing folder).

If the server has no configured responses, a notification tells you nothing was exported.

Import (from Studio)​

  1. Select the target server and click Import.

  2. The Import Configuration wizard opens with three steps:

    • Step 1 — Select File: browse for a *.mockconfig.json file. The wizard shows the file name, server name, export time, response count, and description. If the file belongs to a different server, a warning is shown — confirm this is intentional.
    • Step 2 — Select Strategy: choose how conflicts are resolved (see table below). Merge is selected by default.
    • Step 3 — View Results: see a summary of what was imported (added/updated/skipped per service). Click Finish.

Import strategies​

Strategy (Studio)CLI --strategyBehavior
Merge (Studio default)MergeReplace responses whose name matches (default or named) and add responses with new names. Responses not in the file are kept.
Full replaceFullReplaceRemove all responses for the entire server, then load the file's responses.
Fill only missingSkipOnly import responses for services that have no responses configured yet; services that already have responses are skipped entirely.
Overwrite (CLI default)OverwritePer service: delete all responses of each service present in the file and replace them. Services not in the file are left untouched.

Import / Export (from CLI)​

# Export the responses of a server to a configuration file
aeth sim export ./payment.mockconfig.json --server HttpServer --description "Payment mock for CI"

# Import a configuration; default strategy is Overwrite
aeth sim import ./sim-config.mockconfig.json

# Import with an explicit strategy
aeth sim import ./sim-config.mockconfig.json --strategy Merge

aeth sim start (with no server name) lists the available servers so you can copy the exact server name to export from or import into. Export writes only responses of services present in the server routes; if none are configured, the command fails with a message.

Version control​

Because the export format is JSON, simulation configurations can be committed to Git:

git add sim-configs/payment-gateway.mockconfig.json
git commit -m "Add payment gateway simulation for timeout scenarios"

Team members pull and import the updated configuration.

See Also​