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 Scenarios

Replaying

The following command will replay the scenario and update the recorded responses with the newly received repsonses.

Steps

1

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.

2

Replay the scenario

stoobly-agent scenario replay --overwrite "<SCENARIO-KEY>"
3

(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?