Installation
This extension does some pretty heavy duty work and it requires a cli.Using an external cli allows you to automate the creation of simulation environments from the command line and use other IDEs like IntelliJ or Goland. We'd prefer to perform this level of magic without it but so far physics has gotten in the way. If you plan to install the VSCode extension then you only need to install the VSCode extension from the Marketplace and it will take care of the cli. This is similar to how VSCode handles delve and other language tools.
Install proxymock via VSCode
- Go to the Extensions view (Ctrl+Shift+X on Windows or Command+Shift+X on MacOS/Linux) in Visual Studio Code
- Search for
proxymock
- Click install
The extension will install an additional command line tool called proxymock
which is used to create and manage your mock servers. You don't need to manually install this, but you can learn more about it by checking out the manual instructions below.
The proxymock extension will re-use the existing Speedscale Enterprise installation if present.
Install proxymock via Command Line
The proxymock extension is currently only available for MacOS and Linux. Instructions for Windows are included below in case you want to do some offroading.
- MacOS/Linux
- Windows
Install the cli via Homebrew:
brew install speedscale/tap/proxymock
That's all you need. You can stop reading now.
Ok, you didn't stop reading so here are some manual instructions if you don't use Homebrew:
sh -c "$(curl -Lfs https://downloads.speedscale.com/proxymock/install-proxymock)"
You can inspect the install script to see what it does.
To install non interactively (like in CI/CD) set the SPEEDSCALE_API_KEY
environment variable. This is an Enterprise feature.
If you need to Install a specific version, you can do so by passing it to the install script:
sh -c "$(curl -Lfs https://downloads.speedscale.com/proxymock/install-proxymock)" -s v1.4.63
The proxymock cli is available for Windows, but does not support native traffic capture. These instructions are included in case you know what you are doing and want to install the cli manually.
Open PowerShell and create a Speedscale directory.
mkdir -f $env:userprofile\.speedscale
Download proxymock
into the Speedscale directory.
curl.exe -L "https://downloads.speedscale.com/proxymock/proxymock.exe" -o $env:userprofile\.speedscale\proxymock.exe
If this is your first time using proxymock
you may need to add the Speedscale
directory to your Path environment variable so it is accessible without knowing
the full path.
To add the Speedscale directory to your path, right click on the Windows button and click System.
Click Advanced system settings on the right.
Click Environment Variables.
Under System variables select Path and click Edit.
Create a New entry in the list with the Speedscale directory. If you are unsure of the exact path run this command from PowerShell.
echo $env:userprofile\.speedscale
Click OK and restart PowerShell.