From 5b3bce2603f3094c1ccfc67c5e6b470d2376f307 Mon Sep 17 00:00:00 2001 From: gouravkrosx Date: Wed, 5 Nov 2025 17:18:50 +0530 Subject: [PATCH] docs: add protos flags Signed-off-by: gouravkrosx --- .../java/quickstart/spring-sql.md | 6 +-- .../running-keploy/cli-commands.md | 4 +- .../running-keploy/cli-commands.md | 42 ++++++++++++++----- 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/versioned_docs/version-1.0.0/java/quickstart/spring-sql.md b/versioned_docs/version-1.0.0/java/quickstart/spring-sql.md index 3b4fdb80d..c7a01f4ad 100644 --- a/versioned_docs/version-1.0.0/java/quickstart/spring-sql.md +++ b/versioned_docs/version-1.0.0/java/quickstart/spring-sql.md @@ -209,8 +209,7 @@ _NOTE: You will be required to set the `javaagent` again in your test profile ju ``` - {'<'}/details{'>'} - 2. If you want coverage report also add Jacoco plugin to your _pom.xml_. + {'<'}/details{'>'} 2. If you want coverage report also add Jacoco plugin to your _pom.xml_. {'<'}details{'>'}{'<'}summary{'>'} Add plugin @@ -253,8 +252,7 @@ _NOTE: You will be required to set the `javaagent` again in your test profile ju ``` - {'<'}/details{'>'} - 3. Run your tests using command : `mvn test`. + {'<'}/details{'>'} 3. Run your tests using command : `mvn test`. It will create .html files as test-reports which can be found in your target folder !! diff --git a/versioned_docs/version-2.0.0/running-keploy/cli-commands.md b/versioned_docs/version-2.0.0/running-keploy/cli-commands.md index 836239acd..117f8aaf9 100755 --- a/versioned_docs/version-2.0.0/running-keploy/cli-commands.md +++ b/versioned_docs/version-2.0.0/running-keploy/cli-commands.md @@ -19,11 +19,11 @@ keploy [command] [flags] You can use `--help, -h` flag for all the commands to see available flag options and their purpose. -## Modes and Flags +## Commands and Flags Here are some examples of how to use some common flags: -| Mode | Flags Available | +| Command | Flags Available | | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `record` | `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `-n, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxyport`, `--debug` | | `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` | diff --git a/versioned_docs/version-3.0.0/running-keploy/cli-commands.md b/versioned_docs/version-3.0.0/running-keploy/cli-commands.md index bf2c48eb0..1d7e576f5 100755 --- a/versioned_docs/version-3.0.0/running-keploy/cli-commands.md +++ b/versioned_docs/version-3.0.0/running-keploy/cli-commands.md @@ -19,20 +19,20 @@ keploy [command] [flags] You can use `--help, -h` flag for all the commands to see available flag options and their purpose. -## Modes and Flags +## Commands and Flags Here are some examples of how to use some common flags: -| Mode | Flags Available | -| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `record` | `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `--metadata`, `-n, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxyport`, `--debug` | -| `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` | -| `gen` | `--sourceFilePath`, `--testFilePath`,`--coverageReportPath`,`--testCommand`,`--coverageFormat`,`--expectedCoverage`,`--maxIterations`,`--testDir`,`--llmBaseUrl`,`--model`,`--llmApiVersion` | -| `normalize` | `-p, --path`, `--test-run`, `--tests` | -| `rerecord` | `--test-sets`, `-t` | -| `report` | `--test-sets, -t`, `-p, --path`, `--report-path, -r`, `--body` | -| `sanitize` | `--test-sets, -t`, `-p, --path` | -| `config` | `--generate`,`-p, --path` | +| Command | Flags Available | +| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `record` | `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `--metadata`, `-n, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxyport`, `--debug` | +| `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` | +| `gen` | `--sourceFilePath`, `--testFilePath`,`--coverageReportPath`,`--testCommand`,`--coverageFormat`,`--expectedCoverage`,`--maxIterations`,`--testDir`,`--llmBaseUrl`,`--model`,`--llmApiVersion` | +| `normalize` | `-p, --path`, `--test-run`, `--tests` | +| `rerecord` | `--test-sets`, `-t` | +| `report` | `--test-sets, -t`, `-p, --path`, `--report-path, -r`, `--body` | +| `sanitize` | `--test-sets, -t`, `-p, --path` | +| `config` | `--generate`,`-p, --path` | ## [record](#record) @@ -233,6 +233,26 @@ keploy test [flags] - `--jacoco-agent-path` - Only applicable for test coverage for Java projects. You can override the jacoco agent jar by providing its path +- `--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. + + ```bash + keploy test -c "node src/app.js" --proto-dir "./protos" + ``` + +- `--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. + + ```bash + keploy test -c "node src/app.js" --proto-file "./protos/main.proto" + ``` + +- `--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. + + ```bash + keploy test -c "node src/app.js" --proto-file "./protos/main.proto" --proto-include "./protos/common,./protos/shared" + ``` + + > **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. + ## [gen](#gen) The `gen` cmd in Keploy allows user to generate unit tests using LLM Models.