Skip to content

Commit ff9d3e0

Browse files
authored
docs: add protos flags (#717)
Signed-off-by: gouravkrosx <[email protected]>
1 parent 83cfad3 commit ff9d3e0

File tree

3 files changed

+35
-17
lines changed

3 files changed

+35
-17
lines changed

versioned_docs/version-1.0.0/java/quickstart/spring-sql.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ _NOTE: You will be required to set the `javaagent` again in your test profile ju
209209
</plugin>
210210
```
211211

212-
{'<'}/details{'>'}
213-
2. If you want coverage report also add Jacoco plugin to your _pom.xml_.
212+
{'<'}/details{'>'} 2. If you want coverage report also add Jacoco plugin to your _pom.xml_.
214213

215214
{'<'}details{'>'}{'<'}summary{'>'}
216215
Add plugin
@@ -253,8 +252,7 @@ _NOTE: You will be required to set the `javaagent` again in your test profile ju
253252
</plugin>
254253
```
255254

256-
{'<'}/details{'>'}
257-
3. Run your tests using command : `mvn test`.
255+
{'<'}/details{'>'} 3. Run your tests using command : `mvn test`.
258256

259257
It will create .html files as test-reports which can be found in your target folder !!
260258

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ keploy [command] [flags]
1919

2020
You can use `--help, -h` flag for all the commands to see available flag options and their purpose.
2121

22-
## Modes and Flags
22+
## Commands and Flags
2323

2424
Here are some examples of how to use some common flags:
2525

26-
| Mode | Flags Available |
26+
| Command | Flags Available |
2727
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2828
| `record` | `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `-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` |

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

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ keploy [command] [flags]
1919

2020
You can use `--help, -h` flag for all the commands to see available flag options and their purpose.
2121

22-
## Modes and Flags
22+
## Commands and Flags
2323

2424
Here are some examples of how to use some common flags:
2525

26-
| Mode | Flags Available |
27-
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28-
| `record` | `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `--metadata`, `-n, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxyport`, `--debug` |
29-
| `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` |
30-
| `gen` | `--sourceFilePath`, `--testFilePath`,`--coverageReportPath`,`--testCommand`,`--coverageFormat`,`--expectedCoverage`,`--maxIterations`,`--testDir`,`--llmBaseUrl`,`--model`,`--llmApiVersion` |
31-
| `normalize` | `-p, --path`, `--test-run`, `--tests` |
32-
| `rerecord` | `--test-sets`, `-t` |
33-
| `report` | `--test-sets, -t`, `-p, --path`, `--report-path, -r`, `--body` |
34-
| `sanitize` | `--test-sets, -t`, `-p, --path` |
35-
| `config` | `--generate`,`-p, --path` |
26+
| Command | Flags Available |
27+
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
28+
| `record` | `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `--metadata`, `-n, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxyport`, `--debug` |
29+
| `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`, `--proto-dir`, `--proto-file`, `--proto-include` |
30+
| `gen` | `--sourceFilePath`, `--testFilePath`,`--coverageReportPath`,`--testCommand`,`--coverageFormat`,`--expectedCoverage`,`--maxIterations`,`--testDir`,`--llmBaseUrl`,`--model`,`--llmApiVersion` |
31+
| `normalize` | `-p, --path`, `--test-run`, `--tests` |
32+
| `rerecord` | `--test-sets`, `-t` |
33+
| `report` | `--test-sets, -t`, `-p, --path`, `--report-path, -r`, `--body` |
34+
| `sanitize` | `--test-sets, -t`, `-p, --path` |
35+
| `config` | `--generate`,`-p, --path` |
3636

3737
## [record](#record)
3838

@@ -233,6 +233,26 @@ keploy test [flags]
233233

234234
- `--jacoco-agent-path` - Only applicable for test coverage for Java projects. You can override the jacoco agent jar by providing its path
235235

236+
- `--proto-dir string` - Path of the directory where all protos of a service are located. Used for GRPC test cases to enable better deterministic and proper comparison of protobuf responses.
237+
238+
```bash
239+
keploy test -c "node src/app.js" --proto-dir "./protos"
240+
```
241+
242+
- `--proto-file string` - Path of main proto file. Used for GRPC test cases to enable better deterministic and proper comparison of protobuf responses. Either `--proto-file` or `--proto-dir` must be provided for GRPC tests.
243+
244+
```bash
245+
keploy test -c "node src/app.js" --proto-file "./protos/main.proto"
246+
```
247+
248+
- `--proto-include stringArray` - Path of directories to be included while parsing import statements in proto files. This is optional and used for GRPC test cases when proto files have import dependencies.
249+
250+
```bash
251+
keploy test -c "node src/app.js" --proto-file "./protos/main.proto" --proto-include "./protos/common,./protos/shared"
252+
```
253+
254+
> **Note for GRPC Tests:** When running GRPC test cases, it's recommended to provide proto information using either `--proto-file` or `--proto-dir` flags. If proto information is not provided, Keploy will use basic canonical matching of the protoscopic textual format of GRPC response body, which may be less accurate than proto-based comparison.
255+
236256
## [gen](#gen)
237257

238258
The `gen` cmd in Keploy allows user to generate unit tests using LLM Models.

0 commit comments

Comments
 (0)