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
Let's use the [expresss-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) application to test dedup feature. In our `src/app.js` file we need to have imported and initialized `@keploy/sdk` package, so now let's run the de-duplication command to check : -
48
+
Update the go build command in Dockerfile to add new flags which is required for deduplication (use same flags for native builds)
keploy test -c "docker compose up" --containerName containerName --dedup
110
60
```
111
61
112
-
Voila! Keploy will now detect duplicate tests .
113
-
114
-
### For Python Applications
115
-
116
-
Deduplication works only on test mode there are no special instructions to record your tests.
117
-
118
-
**1. Pre-requsite**
119
-
120
-
Put the latest keploy-sdk in your file : -
62
+
For Native, run:
121
63
122
64
```bash
123
-
pip install keploy coverage requests fastapi
124
-
```
125
-
126
-
In your main app file add the following with along with the other imports. And add Keploy's middleware along with the other middlewares for your app based on your framework:
'keploy.DjangoCoverageMiddleware', # Add keploy middleware here
161
-
],
162
-
163
-
# Other settings
164
-
```
165
-
166
-
**2. Run Deduplication**
68
+
This will generate a dedupData.yaml file
167
69
168
-
Run keploy with test-sets in which you want to check for the duplicate testcases :
169
-
170
-
```sh
171
-
keploy dedup -c "<command to run your Python app>" --delay "<time required for your application to start>"
172
-
```
173
-
174
-
#### Example
175
-
176
-
Let's use the [flask-mongo](https://github.com/keploy/samples-python/tree/main/flask-mongo) application to test dedup feature. In our `app.py` file we need to have imported and initialized `keploy` package, since this is a flask application we can follow above flask approach. Once we have added package, let's run the de-duplication command to check : -
0 commit comments