Skip to content

Commit 1b3ec30

Browse files
Rectified readme by updating logs and apt images (#43)
* rectified readme by updating logs and apt images Signed-off-by: SanskritiHarmukh <[email protected]> * updated jacoco version Signed-off-by: SanskritiHarmukh <[email protected]> --------- Signed-off-by: SanskritiHarmukh <[email protected]>
1 parent cc511cc commit 1b3ec30

File tree

4 files changed

+20
-19
lines changed

4 files changed

+20
-19
lines changed

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Example Employee-Manager App
22

33
A sample Employee-Manager app to test Keploy integration capabilities using [SpringBoot](https://spring.io) and
4-
PostgreSQL.
4+
[PostgreSQL](https://www.postgresql.org/).
55

66
## Pre-requisites
77

@@ -71,11 +71,11 @@ central.
7171

7272
Add *keploy-sdk* as a dependency to your *pom.xml*:
7373

74-
`<dependency>`
75-
`<groupId>`io.keploy `</groupId>`
76-
`<artifactId>`keploy-sdk `</artifactId>`
77-
`<version>`N.N.N `</version>` (eg: 1.2.8)
78-
`</dependency>`
74+
<dependency>
75+
<groupId> io.keploy </groupId>
76+
<artifactId> keploy-sdk </artifactId>
77+
<version> N.N.N </version> (eg: 1.2.8)
78+
</dependency>
7979

8080
or to *build.gradle*:
8181

@@ -148,7 +148,7 @@ or by querying through the browser `http://localhost:8080/api/employees/1`
148148
Now both these API calls were captured as **editable** testcases and written to `test/e2e/keploy-tests` folder. The
149149
keploy directory would also have `mocks` folder.
150150

151-
![testcases](https://i.imgur.com/rhNndcF.png)
151+
![testcases](/src/main/resources/test-cases.png "Recorded Test cases and mocks")
152152

153153
Now, let's see the magic! 🪄💫
154154

@@ -206,7 +206,7 @@ the sample app repo.
206206
<!-- <skipTests>true</skipTests> -->
207207
<argLine>
208208
-javaagent:<your full path to agent jar>.jar
209-
-javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=target/jacoco.exec-->
209+
-javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=target/jacoco.exec
210210
</argLine>
211211

212212
<systemPropertyVariables>
@@ -223,7 +223,7 @@ the sample app repo.
223223
<plugin>
224224
<groupId>org.jacoco</groupId>
225225
<artifactId>jacoco-maven-plugin</artifactId>
226-
<version>0.8.5</version>
226+
<version>0.8.7</version>
227227
<executions>
228228
<execution>
229229
<id>prepare-agent</id>
@@ -283,26 +283,25 @@ java -javaagent:<your full path to agent jar>.jar -jar <your full path to applia
283283
Keploy will run all the captures test-cases, compare and show the results on the console.
284284

285285
```shell
286-
10b3ddd5-42fa-48e7-b98a-b47257272e39 total tests: 3
287-
2022-08-26 14:13:08.993 INFO 11560 --- [ Thread-4] io.keploy.service.GrpcService : testing 1 of 3 testcase id: [ae4a6c91-712a-4566-bf0d-97d708f94b2d]
288-
2022-08-26 14:13:08.994 INFO 11560 --- [ Thread-4] io.keploy.service.GrpcService : testing 2 of 3 testcase id: [4843e03e-76a8-4194-99cb-f62740978d15]
289-
2022-08-26 14:13:08.994 INFO 11560 --- [ Thread-4] io.keploy.service.GrpcService : testing 3 of 3 testcase id: [e5231248-de1d-4c8b-8f15-8dcaf63f45c6]
286+
10b3ddd5-42fa-48e7-b98a-b47257272e39 total tests: 2
287+
2022-08-26 14:13:08.993 INFO 11560 --- [ Thread-4] io.keploy.service.GrpcService : testing 1 of 2 testcase id: [ae4a6c91-712a-4566-bf0d-97d708f94b2d]
288+
2022-08-26 14:13:08.994 INFO 11560 --- [ Thread-4] io.keploy.service.GrpcService : testing 2 of 2 testcase id: [4843e03e-76a8-4194-99cb-f62740978d15]
290289
2022-08-26 14:13:09.061 INFO 11560 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
291290
2022-08-26 14:13:09.061 INFO 11560 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
292291
2022-08-26 14:13:09.062 INFO 11560 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
293292
Hibernate: insert into employees (email, first_name, last_name, timestamp) values (?, ?, ?, ?)
294293
2022-08-26 14:13:09.247 INFO 11560 --- [pool-3-thread-1] io.keploy.service.GrpcService : result : testcase id: [ae4a6c91-712a-4566-bf0d-97d708f94b2d] passed: true
295294
Hibernate: select employee0_.id as id1_0_0_, employee0_.email as email2_0_0_, employee0_.first_name as first_na3_0_0_, employee0_.last_name as last_nam4_0_0_, employee0_.timestamp as timestam5_0_0_ from employees employee0_ where employee0_.id=?
296295
2022-08-26 14:13:09.291 INFO 11560 --- [pool-3-thread-1] io.keploy.service.GrpcService : result : testcase id: [4843e03e-76a8-4194-99cb-f62740978d15] passed: true
297-
Hibernate: select employee0_.id as id1_0_, employee0_.email as email2_0_, employee0_.first_name as first_na3_0_, employee0_.last_name as last_nam4_0_, employee0_.timestamp as timestam5_0_ from employees employee0_
298-
2022-08-26 14:13:09.383 INFO 11560 --- [pool-3-thread-1] io.keploy.service.GrpcService : result : testcase id: [e5231248-de1d-4c8b-8f15-8dcaf63f45c6] passed: true
299-
2022-08-26 14:13:09.388 INFO 11560 --- [ Thread-4] io.keploy.service.GrpcService : test run completed with run id [10b3ddd5-42fa-48e7-b98a-b47257272e39]
296+
2022-08-26 14:13:09.388 INFO 11560 --- [ Thread-4] io.keploy.service.GrpcService : test run completed with run id [1e81233d-e3be-4a4a-afda-a800902ad965]
300297
2022-08-26 14:13:09.388 INFO 11560 --- [ Thread-4] io.keploy.service.GrpcService : || passed overall: TRUE ||
301298
2022-08-26 14:13:19.408 INFO 11560 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
302299
2022-08-26 14:13:19.410 INFO 11560 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
303300
2022-08-26 14:13:19.414 INFO 11560 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
304301
```
305302
303+
![testruns](/src/main/resources/test-runs-success.png "Recent testruns")
304+
306305
## Let's add a Bug in the App
307306
308307
Now let's introduce a bug! Let's try changing something like adding some extra headers in
@@ -322,15 +321,17 @@ You'll notice the failed test-case in the output.
322321
323322
```shell
324323
2022-08-26 13:10:10.289 TRACE 70155 --- [nio-8080-exec-2] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [1]
325-
2022-08-26 13:10:10.307 INFO 70155 --- [pool-3-thread-1] io.keploy.service.GrpcService : result : testcase id: [6aae7f37-798c-42d1-ac8a-c5446880fefc] passed: false
326-
2022-08-26 13:10:10.312 INFO 70155 --- [ Thread-1] io.keploy.service.GrpcService : test run completed with run id [a443f2e9-58c9-4c86-8101-7b3e30ef79ff]
324+
2022-08-26 13:10:10.307 INFO 70155 --- [pool-3-thread-1] io.keploy.service.GrpcService : result : testcase id: [d42a3724-2c78-4f42-8dc6-d25a9b611c7c] passed: false
325+
2022-08-26 13:10:10.312 INFO 70155 --- [ Thread-1] io.keploy.service.GrpcService : test run completed with run id [fcb61332-1025-463f-854e-6f406bce870d]
327326
2022-08-26 13:10:10.312 INFO 70155 --- [ Thread-1] io.keploy.service.GrpcService : || passed overall: FALSE ||
328327
```
329328
330329
To deep dive the problem go to [test runs](http://localhost:6789/testruns)
331330
332-
![testruns](https://i.imgur.com/qwP8r4d.png "Recent testruns")
331+
![testruns](/src/main/resources/test-runs-fail.png "Recent testruns")
332+
333333
334334
**In case of any query, refer to video below,**
335335
336336
[![java-sample](https://user-images.githubusercontent.com/74777863/217864311-94a3dc0c-90bc-4551-aca2-87e82e3d24cb.png)](https://youtu.be/Ssm4TnTkbLs)
337+

src/main/resources/test-cases.png

264 KB
Loading
372 KB
Loading
133 KB
Loading

0 commit comments

Comments
 (0)