Installing Keploy on macOSโ
Keploy uses eBPF to intercept API calls on network layer and generates test cases and mocks/stubs. Keploy does not natively support macOS. However, you can still run it using Lima or Docker.
๐ Choose your preferred method:
Option 1: Install Keploy with Limaโ
-
Check if Lima is installed
If you already have Lima, Go to Step 6. -
Install Lima
brew install lima -
Create a Debian instance
limactl create template://debian-12 -
Start the instance
limactl start debian-12 -
Enter the Linux shell
limactl shell debian-12 -
Install Keploy inside Lima
curl --silent -O -L https://keploy.io/install.sh && source install.sh -
Verify the installation
keploy version
โ If the version shows up, Keploy is installed successfully!
What's Next?โ
๐ฌ Start Capturing Test Casesโ
Begin recording your API calls and automatically generate test cases with Keploy.
Option 2: Install Keploy with Dockerโ
-
Make sure Docker is installed Youโll need Docker Desktop running on macOS.
-
Create a Docker bridge network
docker network create keploy-network -
Install Keploy
curl --silent -O -L https://keploy.io/install.sh && source install.sh -
Verify the installation
keploy version
โ If the version shows up, Keploy is installed successfully!
What's Next?โ
๐ฌ Start Capturing Test cases
โถ๏ธ Recordโ
keploy record -c "docker run -p 8080:8080 --name <containerName> --network keploy-network <applicationImage>" \
--container-name "<containerName>" --buildDelay 60
๐งช Testโ
keploy test -c "docker run -p 8080:8080 --name <containerName> --network keploy-network <applicationImage>" \
--delay 10 --buildDelay 60
๐ Congratulations!โ
Youโve successfully set up Keploy on macOS using either Lima or Docker.