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.
- Clone the repository and move to gin-mongo folder
git clone https://github.com/keploy/samples-go && cd samples-go/gin-mongo
- Create a binary for the application.
go build
- Run keploy in record mode and provide the path to the binary.
sudo -E keploy record -c "./test-app-url-shortener"
- 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"
}'
- Test case with the name 'renametest' has been successfully created. 🎉