Skip to content

Commit 44cd03e

Browse files
Merge branch 'main' into docs/usage-guide
2 parents 1e4d4b4 + e4d5631 commit 44cd03e

File tree

4 files changed

+80
-1
lines changed

4 files changed

+80
-1
lines changed

apps/api/docs/api-test-cases.md

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,80 @@
1-
# TODO
1+
# API Test Cases Documentation
2+
3+
This document provides instructions on how to run the API test cases using Postman and Newman.
4+
5+
## Prerequisites
6+
7+
Before running the test cases, make sure you have the following prerequisites installed:
8+
9+
- [Postman](https://www.postman.com/downloads/)
10+
- [Node.js](https://nodejs.org/) (v20.x or higher)
11+
12+
## Getting Started
13+
14+
1. Clone the repository (if not already done):
15+
16+
```bash
17+
git clone git@github.com:OsmosysSoftware/osm-transcript-summarizer.git
18+
```
19+
20+
2. Install Newman globally (for using Newman):
21+
22+
```bash
23+
npm install -g newman
24+
25+
# Optional, for generating HTML reports
26+
npm install -g newman-reporter-html
27+
```
28+
29+
3. Import the Postman collection:
30+
31+
1. Open Postman.
32+
2. Click on the `Import` button.
33+
3. Select the `apps/api/Transcript Summarization.postman_collection.json` file.
34+
35+
## Running Test Cases
36+
37+
### Using Postman
38+
39+
1. Open Postman.
40+
2. Select the imported collection and click on the `Run` button near the top right.
41+
42+
Alternatively, click the three dots beside the collection name and click `Run collection`
43+
44+
3. Select the environment on top right.
45+
4. Click `Run Transcript Summarizer` to execute the test cases.
46+
47+
### Using Newman
48+
49+
1. Export the environment file from Postman.
50+
2. Open a terminal and run one of the following commands:
51+
52+
1. For console output
53+
54+
```bash
55+
newman run Transcript Summarizer.postman_collection.json -e Transcript Summarizer.postman_environment.json
56+
```
57+
58+
2. For HTML report
59+
60+
```bash
61+
newman run Transcript Summarizer.postman_collection.json -e Transcript Summarizer.postman_environment.json -r html
62+
```
63+
64+
Specify the path to the collection and environment file as required.
65+
66+
## Viewing Results
67+
68+
Both Postman and Newman provide detailed reports after running the test cases. You can view:
69+
70+
- **Run results (for Postman):** Check the results on the Run results page in Postman after testing is completed.
71+
72+
![Postman run results](assets/postman-api-run-results.png)
73+
74+
- **Console Output (for Newman):** Check the terminal/console for test execution details.
75+
76+
![Newman CLI run results](assets/newman-cli-run-results.png)
77+
78+
- **HTML Report (for Newman):** After running Newman with the `-r html` flag, an HTML report is generated. Open the `newman/` directory and find the HTML file.
79+
80+
![Newman HTML report](assets/newman-html-report.png)
59.1 KB
Loading
171 KB
Loading
Loading

0 commit comments

Comments
 (0)