Skip to content

Commit 40966d8

Browse files
feat: add docs for metadata in config file (#598)
* feat: add docs for metadata in config file Signed-off-by: Asish Kumar <[email protected]> * fix: merge conflict Signed-off-by: Asish Kumar <[email protected]> * fix: add a note for same key Signed-off-by: Asish Kumar <[email protected]> --------- Signed-off-by: Asish Kumar <[email protected]>
1 parent b12740d commit 40966d8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Here are some examples of how to use some common flags:
2525

2626
| Mode | Flags Available |
2727
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28-
| `record` | `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `-n, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxyport`, `--debug` |
28+
| `record` | `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `--metadata`, `-n, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxyport`, `--debug` |
2929
| `test` | `--apiTimeout`, `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `--mongoPassword`, `-n, --net, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxyport`, `-t, --testsets`, `--debug`, `-g, --generateTestReport`, `--removeUnusedMocks`, `--coverage`, `--goCoverage`, `--ignoreOrdering`, `--skip-preview` |
3030
| `gen` | `--sourceFilePath`, `--testFilePath`,`--coverageReportPath`,`--testCommand`,`--coverageFormat`,`--expectedCoverage`,`--maxIterations`,`--testDir`,`--llmBaseUrl`,`--model`,`--llmApiVersion` |
3131
| `normailze` | `-p, --path`, `--test-run`, `--tests` |
@@ -72,6 +72,18 @@ keploy record [flags]
7272
keploy record -c "node src/app.js" -d 10
7373
```
7474

75+
- `--metadata string` - Key-value pairs to be added as metadata in the config.yaml file. If a `name` key is provided, it will be used as the test set name.
76+
77+
```bash
78+
keploy record -c "node src/app.js" --metadata "name=mac,env=production,service=gin-mongo,version=2.0.0,team.members[0]=alice,team.members[1]=bob,team.members[2]=carol,labels[0]=canary,labels[1]=stable,config.timeout=30s,config.timeout=60s,complex=a\\,b\\,c\\,d,database.urls[0]=db1.internal,database.urls[1]=db2.internal,database.urls[2]=db3.internal,mode=fast,mode=slow"
79+
```
80+
81+
```bash
82+
keploy record -c "node src/app.js" --metadata "name=mac,env=production,service=gin-mongo,version=2.0.0,team.members[0]=alice,team.members[1]=bob,team.members[2]=carol,labels[0]=canary,labels[1]=stable,config.timeout=30s,config.timeout=60s,complex=a\\,b\\,c\\,d,database.urls[0]=db1.internal,database.urls[1]=db2.internal,database.urls[2]=db3.internal,mode=fast,mode=slow"
83+
```
84+
85+
> **Note:** If the same key is used multiple times, the last occurrence will be used.
86+
7587
- `- n, --network-name string` - Name of the docker network in which the user application is running.
7688

7789
```bash

0 commit comments

Comments
 (0)