Using Goreplay
In this guide, we will use Goreplay to mirror the traffic to HyperTest. Goreplay will run as a systemctl service in your VM.
1. Download goreplay
For arm architecture VM, use this link to download goreplay https://hypertest-binaries-1.s3.ap-south-1.amazonaws.com/mirror-tool/goreplay-0.16.1-arm.tar.gz
To avoid typing in the absolute path to run the goreplay binary, copy it to
/usr/local/bin
for ubuntu and/usr/local
for linux VM. This document assumes the same.
You should run goreplay as a service using systemctl, monit, pm2 etc so that it restarts on boot or failures
2. Run goreplay as a service using systemctl
Create a bash script
goreplay-<SERVICE_NAME>.sh
, copy the following into it. Update the script as specified in the script itself.
Make the file executable by
2. Create a file named /etc/systemd/system/goreplay-{SERVICE_NAME}.service
3. Copy the following content and paste it into the goreplay-{SERVICE_NAME}
file created in above step. Add the absolute path of the bash script you created in step 1.
4. Save the file and run
Check the status of goreplay service and verify it is running.
To Verify the mirroring setup, hit any api on the application and check for request in "last mirrored requests" section or Session page in HyperTest.
Debug mirroring setup via Goreplay
To debug if goreplay is receiving the traffic from your application, we will output the incoming traffic to stdout, so we can see if Goreplay is receiving requests.
Steps:
Now hit any api on your application and verify if Goreplay is able to receive it.
Last updated