Skip to content

Commit acd3193

Browse files
feat: sanitize docs (#640)
* feat: sanitize docs Signed-off-by: Asish Kumar <[email protected]> * feat: fix the typo in normalize cmd Signed-off-by: Asish Kumar <[email protected]> * Update cli-commands.md Signed-off-by: Gourav kumar <[email protected]> --------- Signed-off-by: Asish Kumar <[email protected]> Signed-off-by: Gourav kumar <[email protected]> Co-authored-by: Gourav kumar <[email protected]>
1 parent ae9638d commit acd3193

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

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

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ Here are some examples of how to use some common flags:
2828
| `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` |
31-
| `normailze` | `-p, --path`, `--test-run`, `--tests` |
31+
| `normalize` | `-p, --path`, `--test-run`, `--tests` |
3232
| `rerecord` | `--test-sets`, `-t` |
3333
| `report` | `--test-sets, -t`, `-p, --path`, `--report-path, -r`, `--body` |
34+
| `sanitize` | `--test-sets, -t`, `-p, --path` |
3435
| `config` | `--generate`,`-p, --path` |
3536

3637
## [record](#record)
@@ -360,6 +361,30 @@ keploy report [flags]
360361
keploy report -t "test-set-1" --body
361362
```
362363

364+
## [sanitize](#sanitize)
365+
366+
The `sanitize` command helps remove sensitive data from recorded test cases. It scans test files for potential secrets (like API keys, tokens, etc.), replaces them with template placeholders, and stores the original values in a separate `secret.yaml` file. This allows for sharing test cases without exposing sensitive information.
367+
368+
<b> Usage: </b>
369+
370+
```bash
371+
keploy sanitize [flags]
372+
```
373+
374+
<b> Available flags: </b>
375+
376+
- `-t, --test-sets strings` - Testsets to sanitize, e.g., `-t "test-set-1, test-set-2"`. If not specified, all test sets will be sanitized.
377+
378+
```bash
379+
keploy sanitize -t "test-set-1"
380+
```
381+
382+
- `-p, --path string` - Path to the local directory where generated testcases/mocks are stored. Default is ".".
383+
384+
```bash
385+
keploy sanitize -p "./keploy-tests"
386+
```
387+
363388
## [templatize](#templatize)
364389

365390
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)