For the complete documentation index, see llms.txt. This page is also available as Markdown.

Updating with Overwrite

Background

How to Update Scenarios

Overwriting

The following will overwrite the scenario with newly recorded requests and their respective responses.

Steps

  1. Select the scenario you want to overwrite. To select the scenario, set the scenario key:

stoobly-agent setting scenario "<SCENARIO_KEY>"
  1. Set the Agent to record mode with overwrite policy.

stoobly-agent intercept set --mode record --policy overwrite
  1. Enable request interception with the Agent.

stoobly-agent intercept enable
  1. Replay the scenario either by trigging requests from the application or rerunning a test to verify that the overwrite behaves as expected.

  2. (Optional) Persist the changes with a snapshot to commit the updates to version control:

stoobly-agent scenario snapshot "<SCENARIO_KEY>"

This allows you to:

  • Version control your updated scenario via Git

  • Share the updates with your team

  • Revert to this snapshot if needed later

In the Proxy Settings go to the Data section.

  1. Set a scenario

  2. For the Record Policy, choose overwrite. Then click the Update button at the bottom

  3. Finally set the Proxy Mode at the top left to Record and click the Run button to start intercepting requests

Below is a screenshot showing what the UI configuration will look like:

  1. (Optional) Persist the changes with a snapshot if you want the updates committed to version control:

This allows you to:

  • Version control your updated scenario via Git

  • Share the updates with your team

  • Revert to this snapshot if needed later

Cleanup

After overwriting your scenario successfully, you can disable intercepting requests with the Agent with the following command:

You can also update your scenario key back to what it was before or you can clear it out so the Agent will not use any scenario. To clear the active scenario, run the following command:

Last updated