You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now let's run a few tests to capture some more scenarios:
98
98
@@ -140,7 +140,7 @@ directory would also have `mock.yml` file.
140
140
141
141
Now, let's see the magic! ๐ช๐ซ
142
142
143
-
## Run the test cases
143
+
###Run the test cases
144
144
145
145
First lets shutdown the database to verify that keploy's magic is taking care of the database mocking. No need to worry
146
146
about the database anymore! ๐
@@ -155,7 +155,7 @@ Now, let's run the keploy in test mode: -
155
155
keploy test -c "java -jar target/springbootapp-0.0.1-SNAPSHOT.jar" --delay 10
156
156
```
157
157
158
-
This will run the testcases and generate the report in `keploy/testReports` folder. You will see the following output:-
158
+
This will run the testcases and generate the report in `keploy/reports` folder. You will see the following output:-
159
159
160
160
````shell
161
161
๐ฐ Keploy: 2025-04-17T13:30:11+05:30 INFO starting testfor of {"test case": "[test-1]", "test set": "[test-set-0]"}
@@ -206,27 +206,29 @@ Worry not, just add the ever-changing fields (like our **ts** here) to the **noi
206
206
207
207
> Pro tip: Add `body.timestamp` to noise in`keploy.yml`.
208
208
209
-
<img src="https://github.com/keploy/samples-java/blob/main/employee-manager/img/test-noise.png" alt="Adding Noise to Test case Java Postgres Employee Manager App" width="70%" style={{ borderRadius: '5px' }}/>
209
+
<img src="/docs/img/test-noise-employee-app.png" alt="Adding Noise to Test case Java Postgres Employee Manager App" width="70%" style={{ borderRadius: '5px' }}/>
210
210
211
211
Run that `keploy test`command once more and watch as everything falls into place with all tests passing! ๐
212
212
213
213
Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in`test-x.yml`. Run the tests again and see the magic unfold! โจ๐ฉโ๐ป๐จโ๐ปโจ
214
214
215
215
Next we move on to the instructions to start the application using docker.
216
216
217
-
# Instructions For Starting Using Docker
217
+
## Instructions For Starting Using Docker
218
218
219
219
Prerequisites For Docker:
220
220
221
-
1. Docker Desktop 4.25.2 and above
221
+
1. Docker Desktop 4.25.2 and above or docker cli installed
222
222
223
223
Here we just need to change the command used to start the application.
224
224
225
+
### Capture the testcases ๐ฌ
226
+
225
227
```bash
226
228
keploy record -c "docker compose up" --container-name javaApp --build-delay 100
Here `delay` is the time it takes for your application to get started, after which Keploy will start running the testcases. If your application takes longer than 10s to get started, you can change the `delay` accordingly.
290
292
`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.
@@ -293,7 +295,7 @@ Here `delay` is the time it takes for your application to get started, after whi
293
295
294
296
Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. ๐๐
0 commit comments