Skip to content

feat: save and share feature and network mock scenarios #151

Open

Description

@MaxMichel2

Is your feature request related to a problem?

QA and developers often need to recreate the same combination of feature overrides and mock responses. Applying each setting manually is repetitive and makes it harder to share a reliable reproduction setup.

Describe the solution you'd like

Allow users to save named local scenarios, apply them after reviewing the changes, and export/import a versioned scenario file. The initial scenario should support FeatureFlip local overrides and NetworkMock per-operation selections. Applying a scenario should report entries that cannot be matched to current configuration rather than silently ignoring them.

Illustrative serialized concept (stable identifiers and final schema need design):

{
  "formatVersion": 1,
  "name": "Checkout decline",
  "featureOverrides": { "new_checkout": true },
  "networkMocks": [
    { "operationId": "createPayment", "statusCode": 402, "example": "declined" }
  ]
}

Implementation considerations

Feature and network-mock state are managed by separate modules. Define explicit import/export and apply APIs for each, then coordinate them through a scenario layer; avoid coupling one module to another's internal storage. Use stable keys rather than display names where possible.

Decide whether scenarios include only local feature overrides (recommended for portability) or remote-config values. Define behavior for renamed/removed flags or operations, unknown fields, invalid values, partial application, and schema migration. Preview changes before applying and provide a clear restore/reset path. Exclude credentials, environment secrets, and arbitrary response bodies.

Keep initial storage local and file-based. Cloud synchronization, automatic environment switching, and participation by arbitrary custom modules are separate future scope.

Acceptance criteria

  • Users can save, name, review, apply, export, and import supported scenarios.
  • The format is versioned and validated before any changes are applied.
  • Missing or incompatible identifiers are reported clearly; partial application is visible.
  • Applying a scenario uses explicit module APIs and provides documented restore/reset behavior.
  • Exported files exclude secrets and are documented with a representative example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions