Skip to content

Commit cdf9466

Browse files
docs: updated Petclinic README
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
1 parent 888eaa1 commit cdf9466

File tree

1 file changed

+21
-25
lines changed

1 file changed

+21
-25
lines changed

spring-petclinic/README.md

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
## Introduction
22

33
This is a petclinic app where you can record testcases and mocks by interacting with the UI, and then test them using Keploy.
4-
This project has two parts - the frontend and backend, since Keploy is a backend testing platform, we need to start the backend part of the project
5-
using Keploy and run the frontend as it is.
6-
You can start the backend using Keploy in 2 ways:
7-
- Using Keploy's binary.
8-
- Using Keploy's docker image.
9-
10-
Prerequisites For Binary:
11-
1. Node 20.11.0 LTS
12-
2. OpenJDK 17.0.9
13-
3. MVN version 3.6.3
14-
15-
Prerequisites For Docker:
16-
1. Docker Desktop 4.25.2 and above
4+
This project has two parts - the frontend and backend, since Keploy is a backend testing platform, we need to start the backend part of the project using Keploy and run the frontend as it is.
175

186
## Setup the frontend
197

@@ -32,21 +20,29 @@ npm i
3220
```
3321
npm run start
3422
```
35-
36-
# Instructions For Starting Using Binary
37-
3823
## Spin up the database
3924

4025
```
4126
docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 --net keploy-network --name mypostgres postgres:15.2
4227
```
4328

44-
## Setup Keploy
29+
You can start the backend using Keploy in 2 ways:
30+
- [Using Keploy's binary](#binary-guide)
31+
- [Using Keploy's docker image](#docker-guide)
32+
33+
But first, you need to install Keploy. For that you can use the command below:
4534

4635
```
47-
wget https://raw.githubusercontent.com/keploy/keploy/main/keploy.sh && source keploy.sh
36+
curl -O https://raw.githubusercontent.com/keploy/keploy/main/keploy.sh && source keploy.sh
4837
```
4938

39+
# Instructions For Starting Using Binary <a name="binary-guide"></a>
40+
41+
Prerequisites For Binary:
42+
1. Node 20.11.0 LTS
43+
2. OpenJDK 17.0.9
44+
3. MVN version 3.6.3
45+
5046
## Setup the backend
5147

5248
```
@@ -75,18 +71,21 @@ spring.datasource.url=jdbc:postgresql://localhost:5432/petclinic
7571
## Recording the testcases with Keploy
7672

7773
```
78-
keploy record -c "java -jar target/<name-of-your-jar>"
74+
keploy record -c "java -jar target/spring-petclinic-rest-3.0.2.jar"
7975
```
8076
Now you can start interacting with the UI and Keploy will automatically create the testcases and mocks for it in a folder named 'keploy'.
8177

8278
## Running the testcases using Keploy
8379

8480
```
85-
keploy test -c "java -jar target/<name-of-your-jar>" --delay 20
81+
keploy test -c "java -jar target/spring-petclinic-rest-3.0.2.jar" --delay 20
8682
```
8783

88-
# Instructions For Starting Using Docker
89-
Here we just need to change the command used to start the application and it should work correctly.
84+
# Instructions For Starting Using Docker <a name="docker-guide"></a>
85+
86+
Prerequisites For Docker:
87+
1. Docker Desktop 4.25.2 and above
88+
Here we just need to change the command used to start the application.
9089

9190
```
9291
keploy record -c "docker compose up" --containerName javaApp --buildDelay 100s
@@ -101,6 +100,3 @@ Here `delay` is the time it takes for your application to get started, after whi
101100
`buildDelay` is the time that it takes for the image to get built. This is useful when you are building the docker image from your docker compose file itself.
102101

103102
Hope this helps you out, if you still have any questions, reach out to us on our [Slack](https://join.slack.com/t/keploy/shared_invite/zt-12rfbvc01-o54cOG0X1G6eVJTuI_orSA)
104-
105-
106-

0 commit comments

Comments
 (0)