Skip to content

Commit 921da72

Browse files
authored
Merge branch 'main' into add-django-mysql-guide
2 parents c174ae0 + 85b5eda commit 921da72

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

versioned_docs/version-3.0.0/quickstart/python-flask-mongo.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,14 @@ We'll be running our sample application right on Linux, but just to make things
214214
pip install -r requirements.txt
215215
```
216216

217-
## Start the MongoDB server
217+
## Start the MongoDB container
218218

219219
```bash
220-
sudo service mongod start
220+
docker run -p 27017:27017 -d --network backend --name mongo mongo
221221
```
222222

223+
> **Since we are using a MongoDB container, we need to update the `client` on line 11 in `app.py`, to `localhost`.**
224+
223225
## Lights, Camera, Record! 🎥
224226

225227
To initiate the recording of API calls, execute this command in your terminal:

versioned_docs/version-3.0.0/running-keploy/cli-commands.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,30 @@ keploy normalize [flags]
299299

300300
## [rerecord](#rerecord)
301301

302-
The `rerecord`cmd allow user to record new keploy testcases/mocks from the existing test cases for the given testset(s)
302+
The `rerecord` command allows users to record new Keploy test cases and mocks from existing test cases for the given testset(s).
303303

304-
<b> Usage: </b>
304+
**Usage:**
305305

306306
```bash
307307
keploy rerecord -c "node src/app.js" -t "test-set-0"
308308
```
309309

310+
**Docker Example:**
311+
312+
To re-record test cases for an application running inside a Docker container, use the Docker run command as the value for the `-c` flag:
313+
314+
```bash
315+
keploy rerecord -c "sudo docker run -p 5000:5000 --name flask-jwt-app --network keploy-network flask-jwt-app" -t "test-set-0" --delay 10
316+
```
317+
318+
**`--delay` flag:**
319+
320+
The `--delay` flag specifies the number of seconds Keploy should wait after starting your application before replaying requests to re-record.
321+
This is useful if your application takes some time to start (for example, when running inside a Docker container or a heavy framework).
322+
323+
- Adjust the delay to match your app's startup time.
324+
- For example, use `--delay 10` to wait for 10 seconds.
325+
310326
## [templatize](#templatize)
311327

312328
The `templatize` cmd allows the user to templatize important fields in the testcases who's values are used in the request of testcases and that may change in the future.

0 commit comments

Comments
 (0)