@@ -8,6 +8,7 @@ Before getting started, make sure you have the following installed:
88
99- Latest version of JDK
1010- Install [ Keploy] ( https://keploy.io/docs/server/installation/ )
11+ - Install [ Docker] ( https://docs.docker.com/engine/install/ )
1112- Postman for testing APIs
1213
1314## Getting Started
@@ -66,14 +67,32 @@ The following API endpoints are available:
6667 }
6768 ```
6869
70+ ## Running with Docker
71+
72+ To run the application with Docker, follow these steps:
73+
74+ 1 . Build the Docker image:
75+
76+ ``` bash
77+ docker build -t spring-boot-jwt .
78+ ```
79+
80+ 2 . Run the Docker container:
81+
82+ ``` bash
83+ docker run -p 8080:8080 spring-boot-jwt
84+ ```
85+
86+ The application will be accessible at ` http://localhost:8080 ` .
87+
6988## Integration with Keploy
7089
7190#### RECORD Mode
7291
73921 . To run the application, run
7493
75- ```
76- keploy run -c "./mvnw spring-boot:run" --delay 240
94+ ``` bash
95+ keploy record -c " docker run -p 8080:8080 spring-boot-jwt "
7796 ```
7897
79982 . To generate testcases, you can make API calls using Postman or ` curl ` :
@@ -96,16 +115,12 @@ The following API endpoints are available:
96115 --header ' Authorization: Bearer <your_jwt_token_here>'
97116 ```
98117
99- ```
100-
101- ```
102-
103118#### TEST mode
104119
105120To test the application, start Keploy in test mode. In the root directory, run the following command:
106121
107122``` bash
108- keploy test -c " ./mvnw spring-boot:run " --delay 240
123+ keploy test -c " docker run -p 8080:8080 spring-boot-jwt " --delay 30
109124```
110125
111126This command will run the tests and generate the report in the ` Keploy/reports ` directory in the current working directory.
0 commit comments