Skip to main content
Version: 2.0.0

Rename TestCases

First Ensure keploy is running in record mode.

To name your testcase, make an api call and add a header field whose key is set to Keploy-Test-Name and value is set to the name you want for your testcase.

To demonstrate this, let's consider the gin-mongo sample application.

  1. Clone the repository and move to gin-mongo folder
git clone https://github.com/keploy/samples-go && cd samples-go/gin-mongo
  1. Create a binary for the application.
go build
  1. Run keploy in record mode and provide the path to the binary.
sudo -E keploy record -c "./test-app-url-shortener"
  1. Make an api call and add a header field with key set to Keploy-Test-Name and value set to the name you want for your testcase, let's say 'renametest'.
curl --request POST \
  --url http://localhost:8080/url \
  --header 'content-type: application/json' \
  --header 'Keploy-Test-Name: renametest' \
  --data '{
  "url": "https://google.com"
}'
  1. Test case with the name 'renametest' has been successfully created. 🎉rename testcases