Snapshots

A Stoobly snapshot is a collection of requests and scenarios

What are Snapshots?

circle-info

Think Git commits

Stoobly snapshots are point-in-time copies of your mock requests. They are a collection of request and scenario events along with meta needed to create or delete them. Snapshots can be useful for restoring to a previous state or can be used to share mock requests with others.

Why use Snapshots?

  • Save and backup requests and scenarios

  • Share requests and scenarios

    • Version control requests and scenarios with Git

Folder Structure

/home/user/.stoobly/snapshots
└── history
  └── 170052330
├── log
└── requests
    └── 4a
        └── 4a449553-b074-4782-809f-e52d8358da78
└── scenarios
    └── ea320e50-3a46-41ac-a8fc-a021402c22d6
    └── requests
        └── ea320e50-3a46-41ac-a8fc-a021402c22d6
└── VERSION
   
chevron-righthistoryhashtag

The history folder contains event bucket files such as 170052330 . These event bucket files contain events that occurred during a timeframe. These events are used to rebuild the mock state when snapshots are applied.

chevron-rightloghashtag

The log file contains events that were last applied. It should not be added to version control.

chevron-rightrequestshashtag

The requests folder contains request bucket folders such as 4a . These request bucket folders contain files such as 4a449553-b074-4782-809f-e52d8358da78 that contain the latest snapshot of a request.

chevron-rightscenariohashtag

The scenarios folder contains files such as ea320e50-3a46-41ac-a8fc-a021402c22d6 that contain the latest name and description of a scenario. The folder also contains a requests folder that contains files such as ea320e50-3a46-41ac-a8fc-a021402c22d6 that contain a list of requests that belong to the scenario.

chevron-rightVERSIONhashtag

The VERSION file contains the uuids of events that were last applied. It should not be added to version control.

Next Steps

How to Snapshot Requestschevron-right

Last updated