Skip to content

Commit c747f02

Browse files
authored
fix: openhospital-docs-images-added (#522)
* fix: Openhospital-docs-images-added Signed-off-by: Achanandhi-M <achanandhi.m@gmail.com> * fix: vale linter issue Signed-off-by: Achanandhi-M <achanandhi.m@gmail.com> --------- Signed-off-by: Achanandhi-M <achanandhi.m@gmail.com>
1 parent 22de548 commit c747f02

File tree

10 files changed

+25
-11
lines changed

10 files changed

+25
-11
lines changed
1.34 MB
Loading
1.3 MB
Loading
1.14 MB
Loading

static/img/openhospital-ui.png

229 KB
Loading

static/img/result-openhospital.png

433 KB
Loading

versioned_docs/version-2.0.0/ci-cd/github.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ _And... voila! You have successfully integrated keploy in GitHub CI pipeline
122122
123123
## GitHub Actions
124124
125-
GitHub Actions are a more advanced way to integrate Keploy with GitHub. We will be using [express-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) sample-application for the example. Create a new workflow unde `.github/workflow` with the name `keploy-test.yml`: -
126-
GitHub Actions are a more advanced way to integrate Keploy with GitHub. We will be using [express-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) sample-application for the example. Create a new workflow unde `.github/workflow` with the name `keploy-test.yml`: -
125+
GitHub Actions are a more advanced way to integrate Keploy with GitHub. We will be using [express-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) sample-application for the example. Create a new workflow under `.github/workflow` with the name `keploy-test.yml`: -
126+
GitHub Actions are a more advanced way to integrate Keploy with GitHub. We will be using [express-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) sample-application for the example. Create a new workflow under `.github/workflow` with the name `keploy-test.yml`: -
127127

128128
```yaml
129129
jobs:

versioned_docs/version-2.0.0/dependencies/http.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The http parser is basically divided into two sections, `encode` and `decode`, t
3939

4040
So in the record mode, the encode function is provided with the initial request, which is written to the destination connection and checked if the request is chunked, if it is then parser keeps reading the request from the client connection and write it to the destination connection.
4141

42-
Next, if the request contains the expect header or not. The expect header is used by a client when sending very large requests. So it is basically used to ask the server if it is ready to accept such a large req or not, if it is, then the server responds with a `"100-continue"` response. This is what we also check by writing the request to the destination connection and reading the respnse from it. We start reading the response and we handle chunking in that case as well. Then finally, keploy parse the request and response to store it in mocks.
42+
Next, if the request contains the expect header or not. The expect header is used by a client when sending very large requests. So it is basically used to ask the server if it is ready to accept such a large req or not, if it is, then the server responds with a `"100-continue"` response. This is what we also check by writing the request to the destination connection and reading the response from it. We start reading the response and we handle chunking in that case as well. Then finally, keploy parse the request and response to store it in mocks.
4343

4444
Hope this helps you out, if you still have any questions, reach out to us .
4545

versioned_docs/version-2.0.0/quickstart/java-spring-boot-openhospital.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,31 @@ import InstallationGuide from '../concepts/installation.md'
3737

3838
This project has Three parts - the UI, Core and API, since Keploy is a backend testing platform, we need to start the Backend of the project using Keploy and run the frontend as it is.
3939

40+
If you want to try this quickstart setup on a Mac, use Lima. If you're on Windows, use WSL.
41+
4042
## Setup the Core
4143

4244
```bash
4345
git clone https://github.com/keploy/openhospital-core
4446
git checkout integration-with-keploy
45-
sudo apt install -y maven
4647
mvn clean install -DskipTests=true
47-
sudo docker compose up
48+
docker compose up
4849

4950
```
5051

52+
Note: If you face any issues while setting up the database, please try running docker compose up again. The issue should not occur the second time.
53+
5154
## Setup the Backend
5255

53-
Now it's time to setup the backend of our application. Let's Download the Openhospital API and get started.
56+
Now it's time to setup the backend of our application. Let's Install the Openhospital API and get started.
5457

5558
```bash
5659
git clone https://github.com/keploy/openhospital-api
5760
git checkout integration-with-keploy
5861
mvn clean install -DskipTests=true
5962
```
6063

61-
You can start the Backend using Keploy cli:
64+
Now it's time to start the Backend using Keploy cli:
6265

6366
# Instructions For Starting Using Binary
6467

@@ -74,6 +77,8 @@ Prerequisites For Binary:
7477
keploy record -c "java -cp "target/openhospital-api-0.1.0.jar:rsc/:static/" org.springframework.boot.loader.launch.JarLauncher"
7578
```
7679

80+
<img src="/docs/img/Keploy-record-openhospital.png" alt="Sample Keploy Record Java" width="100%" style={{ borderRadius: '5px' }} />
81+
7782
## Start the frontend
7883

7984
```bash
@@ -84,6 +89,9 @@ npm start
8489
```
8590

8691
Note: Login with username `admin` and password `admin`
92+
<img src="/docs/img/openhospital-ui.png" alt="Sample Keploy Record Java" width="100%" style={{ borderRadius: '5px' }} />
93+
94+
If you followed all the steps correctly, you should see a UI similar to the one shown above.
8795

8896
Now you can start interacting with the UI and Keploy will automatically create the testcases and mocks for it in a folder named 'keploy'
8997

@@ -96,6 +104,12 @@ keploy test -c "java -cp "target/openhospital-api-0.1.0.jar:rsc/:static/" org.sp
96104

97105
🎉 Hooray! You've made it to the end of the binary section! 🎉
98106

107+
Your CLI should look something like this
108+
<img src="/docs/img/Keploy-test-openhospital.png" alt="Sample Keploy Test Java" width="100%" style={{ borderRadius: '5px' }} />
109+
110+
This is a summary of the test cases recorded
111+
<img src="/docs/img/result-openhospital.png" alt="Sample Keploy Test Summary Java" width="100%" style={{ borderRadius: '5px' }} />
112+
99113
Here `delay` is the time it takes for your application to get started, after which Keploy will start running the testcases. If your application takes longer than 10s to get started, you can change the `delay` accordingly.
100114
`buildDelay` is the time that it takes for the image to get built. This is useful when you are building the docker image from your docker compose file itself.
101115

versioned_docs/version-2.0.0/quickstart/node-jwt-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ Our testcases will fail as the token would expire and new Token will generated a
175175

176176
<img src="/docs/img/jwt-test-fail.png" alt="Sample Keploy Test Result Node JWT" width="100%" style={{ borderRadius: '5px' }} />
177177

178-
But for this application, the Token expiration is 10 mins so let's go ahead and test the application within 10mins. Let's add the `Etag` and `accessToken` as the noise in the `test-3.yml` on line 45 under `header.Date`. The file would look like:-
179-
But for this application, the Token expiration is 10 mins so let's go ahead and test the application within 10mins. Let's add the `Etag` and `accessToken` as the noise in the `test-3.yml` on line 45 under `header.Date`. The file would look like:-
178+
But for this application, the Token expiration is 10 mins so let's go ahead and test the application within 10 mins. Let's add the `Etag` and `accessToken` as the noise in the `test-3.yml` on line 45 under `header.Date`. The file would look like:-
179+
But for this application, the Token expiration is 10 mins so let's go ahead and test the application within 10 mins. Let's add the `Etag` and `accessToken` as the noise in the `test-3.yml` on line 45 under `header.Date`. The file would look like:-
180180

181181
```
182182
noise:
@@ -319,7 +319,7 @@ Our testcases will fail as the token would expire and new Token will generated a
319319

320320
<img src="/docs/img/jwt-test-fail.png" alt="Sample Keploy Test Result Node JWT" width="100%" style={{ borderRadius: '5px' }} />
321321

322-
But for this application, the Token expiration is 10 mins so let's go ahead and test the application within 10mins. Let's add the `Etag` and `accessToken` as the noise in the `test-3.yml` on line 45 under `header.Date`. The file would look like:-
322+
But for this application, the Token expiration is 10 mins so let's go ahead and test the application within 10 mins. Let's add the `Etag` and `accessToken` as the noise in the `test-3.yml` on line 45 under `header.Date`. The file would look like:-
323323

324324
```
325325
noise:

versioned_docs/version-2.0.0/server/sdk-installation/python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ To get the coverage data for your unit tests:
3232
coverage run --data-file=.coverage.unit test_program.py
3333
```
3434

35-
Here, test_program.py is the unit test program you want to run, and --data-file is set to .coverage.unit becuase, by default, raw coverage data would be written to .coverage which is where coverage data for keploy tests is present, so to avoid overwritting we pass a new file through data-file flag.
35+
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.
3636

3737
> Note: If you face any problems with running the coverage library, you can refer to the documentation.
3838

0 commit comments

Comments
 (0)