Skip to content

Commit ffaa576

Browse files
committed
Update README to enhance project description and clarify environment variable setup
1 parent 11c06f9 commit ffaa576

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

README.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
# Postman Collection Runner
22

3-
This project is a Node.js utility to run requests from a Postman collection concurrently. It reads the Postman collection JSON file, processes the requests, and executes them using the `axios` library. The tool provides detailed logs for each request's execution status (success or failure) and tracks the execution time, along with a summary report of the test run.
3+
This project is a Node.js utility to execute requests from a Postman collection concurrently. It reads the Postman collection JSON file, processes the requests (including handling placeholders and authentication), and executes them using the `axios` library. The tool provides detailed logs for each request's execution status (success or failure), tracks execution time, and generates a comprehensive summary report.
44

55
## Features
66

7-
- Parse Postman collection JSON and extract requests and global information.
8-
- Support for multiple authentication types: API Key, Bearer, Basic Auth.
9-
- Run requests concurrently using `Promise.allSettled` for better performance.
10-
- Log success and failure of each request along with execution time.
11-
- Generate a summary report with total execution time, successful/failed requests, and average time per request.
7+
- Parse Postman collection JSON and extract requests and global information
8+
- Replace placeholders (e.g., `{{PLACEHOLDER}}`) in the collection with environment variables
9+
- Support for multiple authentication types: API Key, Bearer, Basic Auth
10+
- Execute requests concurrently using `Promise.allSettled` for better performance
11+
- Log detailed information for each request, including success/failure, execution time, and response data
12+
- Generate a summary report with:
13+
- Total execution time
14+
- Successful/failed requests
15+
- Average time per request
1216

1317
## Prerequisites
1418

@@ -48,9 +52,18 @@ Make sure you have a Postman collection JSON file. If you don't have one, you ca
4852
- Select `Export` and choose the format `Collection v2.1 (recommended)`.
4953
- Save the JSON file.
5054

51-
### 2. Run the Script
55+
### 2. Set Up Environment Variables
5256

53-
Place your Postman collection JSON file in the `postman-collections` directory or update the path in the script.
57+
Create a `.env` file in the root directory to define environment variables used in your Postman collection (e.g., replacing `{{PLACEHOLDER}}` values). Example:
58+
59+
```env
60+
API_KEY=your_api_key
61+
BASE_URL=https://api.example.com
62+
```
63+
64+
### 3. Run the Script
65+
66+
Place your Postman collection JSON file in the `postman-collections` directory or update the `COLLECTION_PATH` variable in the `index.js` file to point to your file.
5467

5568
To run the utility, use the following command:
5669

@@ -60,7 +73,7 @@ npm start
6073

6174
This will execute the requests in the collection concurrently and log the results in the terminal. You will also see a summary report at the end of the execution.
6275

63-
### 3. Customization
76+
### 4. Customization
6477

6578
- **Collection Path**: Update the `COLLECTION_PATH` variable in the `index.js` file to point to your collection file.
6679

0 commit comments

Comments
 (0)