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
- Download the [Keploy Windows AMD64](https://github.com/keploy/keploy/releases/latest/download/keploy_windows_amd64.tar.gz), and extract the files from the zip folder.
50
-
51
51
- Run the `keploy.exe` file.
52
52
53
53
</details>
@@ -56,7 +56,6 @@ The UI can be accessed at http://localhost:6789
56
56
<summary>Windows ARM</summary>
57
57
58
58
- Download the [Keploy Windows ARM64](https://github.com/keploy/keploy/releases/latest/download/keploy_windows_arm64.tar.gz), and extract the files from the zip folder.
59
-
60
59
- Run the `keploy.exe` file.
61
60
62
61
</details>
@@ -68,11 +67,11 @@ central.
68
67
69
68
Add *keploy-sdk* as a dependency to your *pom.xml*:
70
69
71
-
<dependency>
72
-
<groupId>io.keploy</groupId>
73
-
<artifactId>keploy-sdk</artifactId>
74
-
<version>N.N.N</version> (eg: 1.2.6)
75
-
</dependency>
70
+
`<dependency>`
71
+
`<groupId>`io.keploy `</groupId>`
72
+
`<artifactId>`keploy-sdk `</artifactId>`
73
+
`<version>`N.N.N `</version>` (eg: 1.2.8)
74
+
`</dependency>`
76
75
77
76
or to *build.gradle*:
78
77
@@ -82,26 +81,26 @@ or to *build.gradle*:
82
81
83
82
-**For Spring based application**
84
83
85
-
Add `@Import(KeployMiddleware.class)` below `@SpringBootApplication` in your main class.
86
-
84
+
Add `@Import(KeployMiddleware.class)` below `@SpringBootApplication` in your main class.
87
85
-**Run along with agent to mock external calls of your API 🤩🔥**
88
86
89
-
- Download the latest - Download the latest agent jar
90
-
from [here](https://search.maven.org/artifact/io.keploy/keploy-sdk/1.2.6/jar) (eg: 1.2.6)
87
+
- Download the latest - Download the latest agent jar
88
+
from [here](https://search.maven.org/remotecontent?filepath=io/keploy/agent/1.2.8/agent-1.2.8.jar) (eg: 1.2.8)
91
89
92
-
- Prefix `-javaagent:` with absolute classpath of agent jar (eg: `-javaagent:<your full path to agent jar>/agent-1.2.6.jar`) is possible through 3 ways:-
90
+
*Note: you can find all agent jars from [here](https://search.maven.org/artifact/io.keploy/agent/1.2.7/jar).*
91
+
- Prefix `-javaagent:` with absolute classpath of agent jar (eg: `-javaagent:<your full path to agent jar>/agent-1.2.8.jar`) is possible through 3 ways:-
93
92
94
-
1.**Using Intellij :** Go to Edit Configuration-> add VM options -> paste _java agent_ edited above.
93
+
1.**Using Intellij :** Go to Edit Configuration-> add VM options -> paste _java agent_ edited above.
94
+
2.**Using Command Line :**
95
95
96
-
2.**Using Command Line :**
97
-
```
98
-
export JAVA_OPTS="$JAVA_OPTS -javaagent:<your full path to agent jar>/agent-1.2.6.jar"
99
-
```
96
+
```
97
+
export JAVA_OPTS="$JAVA_OPTS -javaagent:<your full path to agent jar>/agent-1.2.8.jar"
98
+
```
99
+
3. **Running via Tomcat Server :**
100
100
101
-
3. **Running via Tomcat Server :**
102
-
```
103
-
export CATALINA_OPTS="$CATALINA_OPTS -javaagent:<your full path to agent jar>/agent-1.2.6.jar"
104
-
```
101
+
```
102
+
export CATALINA_OPTS="$CATALINA_OPTS -javaagent:<your full path to agent jar>/agent-1.2.8.jar"
To record testcases use `KEPLOY_MODE` env variable and set the same to `record` mode.
@@ -130,7 +132,6 @@ To record testcases use `KEPLOY_MODE` env variable and set the same to `record`
130
132
mvn spring-boot:run
131
133
```
132
134
133
-
134
135
## Generate testcases
135
136
136
137
To generate testcases we just need to **make some API calls.** You can use [Postman](https://www.postman.com/), [Hoppscotch](https://hoppscotch.io/), or simply `curl`
@@ -168,11 +169,10 @@ curl --location --request GET 'http://localhost:8080/api/employees/1'
168
169
169
170
or by querying through the browser `http://localhost:8080/api/employees/1`
170
171
171
-
Now both these API calls were captured as **editable** testcases and written to `test/e2e/keploy-tests` folder. The keploy directory would also have `mocks` folder.
172
+
Now both these API calls were captured as **editable** testcases and written to `test/e2e/keploy-tests` folder. The keploy directory would also have `mocks` folder.
172
173
173
174

174
175
175
-
176
176
Now, let's see the magic! 🪄💫
177
177
178
178
## Test mode
@@ -205,12 +205,10 @@ If not present, you can add ``SampleJavaApplication_Test.java`` in the test modu
205
205
```
206
206
207
207
1. To automatically download and run the captured test-cases. Let's run the test-file.
208
-
209
208
2. To get test coverage, in addition to above follow below instructions.
210
-
211
209
3. Add maven-surefire-plugin to your *pom.xml*.
212
210
213
-
```xml
211
+
```xml
214
212
<plugin>
215
213
<groupId>org.apache.maven.plugins</groupId>
216
214
<artifactId>maven-surefire-plugin</artifactId>
@@ -224,7 +222,8 @@ If not present, you can add ``SampleJavaApplication_Test.java`` in the test modu
224
222
</systemPropertyVariables>
225
223
</configuration>
226
224
</plugin>
227
-
```
225
+
```
226
+
228
227
4. Add Jacoco plugin to your *pom.xml*.
229
228
230
229
```xml
@@ -268,20 +267,12 @@ If not present, you can add ``SampleJavaApplication_Test.java`` in the test modu
268
267
269
268
It will create .html files as test-reports which can be found in your target folder !!
270
269
271
-
272
270
**_We got 75.3% without writing any testcases. 🎉_**
273
271
274
-
275
-
276
272
Go to the Keploy Console TestRuns Page to get deeper insights on what testcases ran, what failed.
0 commit comments