diff --git a/versioned_docs/version-3.0.0/server/sdk-installation/go.md b/versioned_docs/version-3.0.0/server/sdk-installation/go.md
index aec6e12ac..bb750f314 100644
--- a/versioned_docs/version-3.0.0/server/sdk-installation/go.md
+++ b/versioned_docs/version-3.0.0/server/sdk-installation/go.md
@@ -1,6 +1,6 @@
---
id: go
-title: Merge Unit Test Coverage Data
+title: Merge Unit and Keploy Test Coverage Data
sidebar_label: Go
tags:
- go
@@ -18,17 +18,15 @@ keyword:
- Go Test
---
-import WhatAreKeployFeatures from './index.md'
-
-
-
## π οΈ Language Specific Requirements
-| Programming Language | Prerequisites |
-| :------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| go | 1. The application should have a graceful shutdown to stop the API server on `SIGTERM` or `SIGINT` signals. Refer [appendix](#graceful-shutdown) for basic implementation of graceful shutdown function.
2. The go binary should be built with `-cover` flag. |
+There are two requirements to get coverage for Go: first, you need to perform a graceful shutdown, and second, you must build the binary using the `-cover` flag. Once thatβs done, run `keploy test`.
+
+| Programming Language | Prerequisites |
+| :------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| go | 1. The application should have a graceful shutdown to stop the API server on `SIGTERM` or `SIGINT` signals. Refer below code for basic implementation of graceful shutdown function.
2. The go binary should be built with `-cover` flag. |
-## Graceful Shutdown
+## 1. Graceful Shutdown
It is important that the application is shutdown gracefully. In case of Golang, function for graceful shutdown:
@@ -60,7 +58,7 @@ func main() {
}
```
-## Usage
+## 2. Usage
For keploy test coverage the binary must built with `-cover` flag:
@@ -68,6 +66,27 @@ For keploy test coverage the binary must built with `-cover` flag:
go build -cover
```
+Once it has been done, run keploy test command:
+
+```
+keploy test -c "your_application_command"
+```
+
+After successful execution of this command, A coverage report would be generated inside the test-run folder of keploy/reports.
+
+```
+keploy
+βββ reports
+β βββ test-run-0
+β βββ coverage.yaml
+β βββ test-set-0-report.yaml
+βββ test-set-0
+ βββ mocks.yaml
+ βββ tests
+ βββ test-1.yaml
+ βββ test-2.yaml
+```
+
To get the coverage data for unit tests :
```go
diff --git a/versioned_docs/version-3.0.0/server/sdk-installation/java.md b/versioned_docs/version-3.0.0/server/sdk-installation/java.md
index 0610765a8..033869079 100644
--- a/versioned_docs/version-3.0.0/server/sdk-installation/java.md
+++ b/versioned_docs/version-3.0.0/server/sdk-installation/java.md
@@ -1,6 +1,6 @@
---
id: java
-title: Merge Unit Test Coverage Data
+title: Merge Unit and Keploy Test Coverage Data
sidebar_label: Java
tags:
- java
@@ -18,10 +18,6 @@ keyword:
- Junit
---
-import WhatAreKeployFeatures from './index.md'
-
-
-
## π οΈ Language Specific Requirements
| Programming Language | Prerequisites |
@@ -111,6 +107,27 @@ You will need to add the following plugins in `pom.xml` file of your application
```
+Once it has been done, run keploy test command:
+
+```
+keploy test -c "your_application_command"
+```
+
+After successful execution of this command, A coverage report would be generated inside the test-run folder of keploy/reports.
+
+```
+keploy
+βββ reports
+β βββ test-run-0
+β βββ coverage.yaml
+β βββ test-set-0-report.yaml
+βββ test-set-0
+ βββ mocks.yaml
+ βββ tests
+ βββ test-1.yaml
+ βββ test-2.yaml
+```
+
Now, To get the combined report as well as coverage report for your unit tests, Run
```bash
diff --git a/versioned_docs/version-3.0.0/server/sdk-installation/javascript.md b/versioned_docs/version-3.0.0/server/sdk-installation/javascript.md
index 3c94d5309..325a0983c 100644
--- a/versioned_docs/version-3.0.0/server/sdk-installation/javascript.md
+++ b/versioned_docs/version-3.0.0/server/sdk-installation/javascript.md
@@ -1,6 +1,6 @@
---
id: javascript
-title: Merge Unit Test Coverage Data
+title: Merge Unit and Keploy Test Coverage Data
sidebar_label: Javascript
tags:
- javascript
@@ -21,10 +21,6 @@ keywords:
- Typescript
---
-import WhatAreKeployFeatures from './index.md'
-
-
-
## π οΈ Language Specific Requirements
| Programming Language | Prerequisites |
@@ -47,8 +43,37 @@ Update the `package.json` file that runs the application:
}
```
+#### Install nyc:
+
+```
+npm i nyc
+```
+
In the test script, the --coverage flag triggers report generation for Jest. For other testing frameworks like Mocha, Intern, or Tap, you will need to use their respective coverage tools.
+#### Run keploy test command:
+
+Once it has been done, run keploy test command:
+
+```
+keploy test -c "your_application_command"
+```
+
+After successful execution of this command, A coverage report would be generated inside the test-run folder of keploy/reports.
+
+```
+keploy
+βββ reports
+β βββ test-run-0
+β βββ coverage.yaml
+β βββ test-set-0-report.yaml
+βββ test-set-0
+ βββ mocks.yaml
+ βββ tests
+ βββ test-1.yaml
+ βββ test-2.yaml
+```
+
To generate coverage report for your unit tests, Run:
```bash
diff --git a/versioned_docs/version-3.0.0/server/sdk-installation/python.md b/versioned_docs/version-3.0.0/server/sdk-installation/python.md
index bf79db7ca..f2fb0e64a 100644
--- a/versioned_docs/version-3.0.0/server/sdk-installation/python.md
+++ b/versioned_docs/version-3.0.0/server/sdk-installation/python.md
@@ -1,6 +1,6 @@
---
id: python
-title: Merge Unit Test Coverage Data
+title: Merge Unit and Keploy Test Coverage Data
sidebar_label: Python
tags:
- python
@@ -16,16 +16,45 @@ keyword:
- Pytest
---
-import WhatAreKeployFeatures from './index.md'
-
-
-
| Programming Language | Prerequisites |
| :------------------: | :------------------------------------------------------------------------ |
| python | [Python 3 and above](https://www.python.org/downloads/)
coverage.py |
## Usage
+#### First install Coverage library:
+
+```
+pip install coverage
+```
+
+For Python, Keploy will automatically generate the coverage report after you run the command below.
+
+```
+keploy test -c "your_application_command"
+```
+
+If youβre running with **Unicorn**, use the following command:
+
+```
+keploy test -c "python -m uvicorn application.main:app --reload" --delay 10
+```
+
+After successful execution of this command, A coverage report would be generated inside the test-run folder of keploy/reports.
+
+```
+keploy
+βββ reports
+β βββ test-run-0
+β βββ coverage.yaml
+β βββ test-set-0-report.yaml
+βββ test-set-0
+ βββ mocks.yaml
+ βββ tests
+ βββ test-1.yaml
+ βββ test-2.yaml
+```
+
To get the coverage data for your unit tests:
```sh
@@ -34,8 +63,6 @@ coverage run --data-file=.coverage.unit test_program.py
Here, test_program.py is the unit test program you want to run, and --data-file is set to .coverage.unit because, by default, raw coverage data would be written to .coverage which is where coverage data for keploy tests is present, so to avoid overwriting we pass a new file through data-file flag.
-> Note: If you face any problems with running the coverage library, you can refer to the documentation.
-
### Combine And Get Report
To combine the coverage from the unit tests, and Keploy's API tests we can use the command below: