How to Update Scenarios
Prerequisites
Why Update Scenarios?
API flows change over time. That is, the composition of a request within the scenario may change e.g. a request may require a new query param. When this happens we need to update the Stoobly to receive the latest updates. This is done in three high-level steps:
Configure a scenario to be overwritable
Enable recording
Manually triggering the scenario or using a test to replay requests
Afterwards, the scenario will be available for use and will contain all the updated requests.
Updating Scenarios
Before updating a scenario, it is recommended to create a snapshot in case changes need to be reverted.
There are two ways to update scenarios, from the UI and from the CLI:
Updating with OverwriteUpdating with ReplayThe first request that gets recorded will overwrite the scenario. Any future recorded request will be appended.
Persisting Changes
How to Snapshot RequestsReverting Changes
Sometimes you need to revert changes such as when you accidentally record wrong requests to the scenario or overwrite data unintentionally.
Instead of experiencing data loss or corruption, you can reset the scenario back to it's previous snapshotted state.
For more information see our documentation on the snapshots feature:
SnapshotsCommand
stoobly-agent scenario reset
Options
$ stoobly-agent scenario reset --help
Usage: stoobly-agent scenario reset [OPTIONS] SCENARIO_KEY
Reset a scenario to its snapshot state
Options:
--force Toggles whether resources are hard deleted.
-h, --help Show this message and exit.
Last updated
Was this helpful?