Updating with Replay
There are two ways to update a scenario using the CLI.
Replay a scenario's requests and update the request responses
Overwrite the scenario with new requests and responses
Background
How to Update ScenariosReplaying
If request(s) require authorization headers, they should be added dynamically.
The following command will replay the scenario and update the recorded responses with the newly received repsonses.
Steps
Decorate requests with credentials
An authorization header or a cookie may be needed to be added to replayed requests. To do so, see the following guide on how to use lifecycle hooks.
Replay the scenario
stoobly-agent scenario replay --overwrite "<SCENARIO-KEY>"(Optional) Persist changes with a snapshot
If you want to version control or share the updated scenario, create a snapshot:
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
Last updated
Was this helpful?