Repository
proxymock acts like a distributed version control system that helps manage snapshot changes on your local machine. It operates using two main repositories:
- Local Repository – Exists on your machine and is maintained by proxymock.
- Remote Repository (optional) – Exists in the cloud. This is only applicable if you are using Speedscale Enterprise. The free proxymock extension does not use this unless you have an enterprise API key.
How proxymock Manages the Local Repository
- When you run
proxymock init
(or start the IDE extension), proxymock creates a.speedscale
directory in your home directly, initializing a local repository. - Your local repository consists of:
- Working Snapshots: The actual traffic recordings you are working with.
- Reports: Analysis reports generated from running the snapshots (requires Speedscale Enterprise).
- Configuration: Test configs and other configuration files used for replay (requires Speedscale Enterprise).
- Typical Workflow:
- Record or import snapshots – Importing a snapshot adds it to your local repository.
- Stage Changes – Modify the files in the working directory directly or using the IDE extension.
- Push Changes (
speedctl push snapshot
) – Push the snapshot to the remote repository (requires Speedscale Enterprise).
<snapshot UID>.json
<snapshot UID>
├── raw.jsonl
├── action.jsonl
└── reaction.jsonl
snapshot UID.json
contains metadata about the snapshot.raw.jsonl
contains the request and response pairs.action.jsonl
contains and tests derived from the raw file.reaction.jsonl
contains the mock server configuration derived from the raw file.
The action and reaction files are generated by the speedctl learn
command and should not be modified directly.
Pushing Changes
speedctl push snapshot
orspeedctl push report
- Sends changes from the local repository to the remote repository.
- Ensures collaboration by updating the shared project.
Pulling Changes
speedctl pull snapshot
orspeedctl pull report
- Retrieves updates from the remote repository and merges them into your local repository.
- Helps synchronize your work with teammates’ changes.
Summary
- Local Repo: Stores your snapshots, reports and configuration.
- Remote Repo: Central place for sharing and collaboration.
- Pushing: Uploads commits to the remote repo.
- Pulling: Downloads updates from the remote.
For further questions, please join our slack.