Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/StartKeployDocker.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function StartKeploy() {
<strong>Record the test cases</strong>
</p>
<CodeBlock language="bash">
{`keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>" --delay 10`}
{`keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>"`}
</CodeBlock>

<p>
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-2.0.0/quickstart/samples-echo.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Now both these API calls were captured as a testcase and should be visible on th
Now that we have our testcase captured, run the test file.

```shell
sudo -E PATH=$PATH keploy record -c "./echo-psql-url-shortener" --delay 10
sudo -E PATH=$PATH keploy test -c "./echo-psql-url-shortener" --delay 10
```

So no need to setup dependencies like mongoDB, web-go locally or write mocks for your testing.
Expand Down
8 changes: 1 addition & 7 deletions versioned_docs/version-2.0.0/running-keploy/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Here are some examples of how to use some common flags:

| Command | Flags Available |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `record` | `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `-n, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxyport`, `--debug` |
| `record` | `-c, --command`, `--config-path`, `--containerName`, `-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` |
| `normailze` | `-p, --path`, `--test-run`, `--tests` |
Expand Down Expand Up @@ -66,12 +66,6 @@ keploy record [flags]
keploy record -c "docker compose up" --container-name "my-app-container"
```

- `-d, --delay uint` - Delay in seconds to run user application. The default is 5 seconds.

```bash
keploy record -c "node src/app.js" -d 10
```

- `- n, --network-name string` - Name of the docker network in which the user application is running.

```bash
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-2.0.0/server/linux/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ docker network create keploy-network
Now, we will record the testcases.

```shell
keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>" --delay 10
keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>"
```

#### Run the Testcases
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-2.0.0/server/macos/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Here are few points to consider before recording!
Utilize keploy to capture testcases. **Execute** the following command within your application's **root directory**.

```shell
keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>" --delay 10
keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>"
```

Make API Calls using Postman , or cURL commands.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ docker network create keploy-network
Now, we record the testcases.

```shell
keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>" --delay 10
keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>"
```

#### Run the Test Mode
Expand Down
67 changes: 11 additions & 56 deletions versioned_docs/version-4.0.0/running-keploy/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,15 @@ You can use `--help, -h` flag for all the commands to see available flag options

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

| 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` (Deprecated) | `--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`, `--metadata`, `-n, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxy-port`, `--debug` |
| `test` | `--apiTimeout`, `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `--mongoPassword`, `-n, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxy-port`, `-t, --testsets`, `--debug`, `--removeUnusedMocks`, `--skip-coverage`, `--ignoreOrdering`, `--disable-line-coverage`, `--proto-dir`, `--proto-file`, `--proto-include` |
| `gen` (Deprecated) | `--sourceFilePath`, `--testFilePath`,`--coverageReportPath`,`--testCommand`,`--coverageFormat`,`--expectedCoverage`,`--maxIterations`,`--testDir`,`--llmBaseUrl`,`--model`,`--llmApiVersion` |
| `normalize` | `-p, --path`, `--test-run`, `--tests` |
| `report` | `--test-sets, -t`, `-p, --path`, `--report-path, -r`, `--body` |
| `sanitize` | `--test-sets, -t`, `-p, --path` |
| `config` | `--generate`,`-p, --path` |

## [record](#record)

Expand Down Expand Up @@ -74,12 +73,6 @@ keploy record -c "docker compose up" --container-name "my-app-container"

> **Podman:** on Linux, with the Keploy that `install.sh` installs (v3.8.60 or later), an application started in rootful Podman with `podman run` or `podman compose` works the same way: `keploy record -c "podman compose up" --container-name "my-app-container"`. See [Platform requirements](/docs/concepts/platform-requirements/#podman) for what `podman compose` needs.

- `-d, --delay uint` - Delay in seconds to run user application. The default is 5 seconds.

```bash
keploy record -c "node src/app.js" -d 10
```

- `--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.

```bash
Expand Down Expand Up @@ -119,12 +112,6 @@ keploy record -c "node src/app.js" --proxy-port 8080
keploy record -c "node src/app.js" --debug
```

- `rerecord` - Record certain test-sets again

```bash
keploy record -c "node src/app.js" --rerecord "test-set-0"
```

## [test](#test)

The `test` mode in Keploy allows the user to run the recoded testcases from the API calls and execute assertion. A detailed report is produced after the tests are executed and it's then saved in the yaml format in `keploy/reports` directory in the current working directory.
Expand Down Expand Up @@ -211,12 +198,6 @@ keploy test -c "node src/app.js" -t "test-set-1,test-set-3" --delay 10
keploy test -c "node src/app.js" --delay 10 --debug
```

- `-g, --generate-test-report` - To generate the test report. The default is true.

```bash
keploy test -c "node src/app.js" --delay 10 -g=false
```

- `--remove-unused-mocks` - To remove unused mocks from mock file. The default is false.

```bash
Expand All @@ -231,10 +212,10 @@ keploy test -c "node src/app.js" --delay 10 --ignore-ordering

- `--skip-coverage` - skip code coverage computation while running the test cases

- `--skip-preview` - skip line by line code coverage preview but display the total coverage.
- `--disable-line-coverage` - skip the line by line code coverage preview of a JavaScript application, but display the total coverage.

```bash
keploy test -c "node src/app.js" --delay 10 --skip-preview
keploy test -c "node src/app.js" --delay 10 --disable-line-coverage
```

- `--jacoco-agent-path` - Only applicable for test coverage for Java projects. You can override the jacoco agent jar by providing its path
Expand Down Expand Up @@ -335,32 +316,6 @@ keploy normalize -p "./tests" --test-run "test-run-10" --tests "test-set-1:test-
keploy normalize --allow-high-risk
```

## [rerecord](#rerecord)

The `rerecord` command allows users to record new Keploy test cases and mocks from existing test cases for the given testset(s).

**Usage:**

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

**Docker Example:**

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:

```bash
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
```

**`--delay` flag:**

The `--delay` flag specifies the number of seconds Keploy should wait after starting your application before replaying requests to re-record.
This is useful if your application takes some time to start (for example, when running inside a Docker container or a heavy framework).

- Adjust the delay to match your app's startup time.
- For example, use `--delay 10` to wait for 10 seconds.

## [report](#report)

The `report` command in Keploy is used to display a detailed summary of test results. It can show a compact table-style diff or full body diffs (with colorized JSON), and it can read from the latest test run or a specific report file.
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.0.0/server/linux/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ docker network create keploy-network
Now, we will record the testcases.

```shell
keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>" --delay 10
keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>"
```

#### Run the Testcases
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.0.0/server/macos/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Here are few points to consider before recording!
Utilize keploy to capture testcases. **Execute** the following command within your application's **root directory**.

```shell
keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>" --delay 10
keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>"
```

Make API Calls using Postman, or cURL commands.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ docker network create keploy-network
Now, we record the testcases.

```shell
keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>" --delay 10
keploy record -c "docker run -p <appPort>:<hostPort> --name <containerName> --network keploy-network --rm <applicationImage>" --containerName "<containerName>"
```

#### Run the Test Mode
Expand Down
Loading