open-index/open-npm huggingface dataset:
npm package: @raj30081987/dynamic-api-runner
Description: High-performance parallel API testing runner with JSON validation for Postman, Requestly collections
Author: Rajesh Sawant
Latest version: 1.0.0

# Dynamic API Runner

A high-performance parallel API testing runner with JSON validation support for Postman, Requestly, and custom collection formats.

## Installation

### Global Installation
```bash
npm install -g dynamic-api-runner
```

### Local Installation
```bash
npm install dynamic-api-runner
```

## Usage

### Command Line
```bash
dynamic-runner [environment]
```

### Examples
```bash
# Run tests with develop environment
dynamic-runner develop

# Run tests with staging environment  
dynamic-runner staging

# Run tests with production environment
dynamic-runner production
```

## Features

- ⚡ **Parallel Execution** - All tests run concurrently for maximum speed
- 🔧 **Multiple Formats** - Supports Postman, Requestly, and simple array collections
- ✅ **JSON Validation** - Flexible validation rules without hardcoding
- 🌐 **Environment Variables** - Dynamic variable replacement
- 📊 **Rich Reporting** - HTML and JSON reports with detailed statistics
- 🔒 **Security Focused** - No vulnerable dependencies

## Directory Structure

```
your-project/
├── collection/          # Collection files (.json)
├── environments/        # Environment files (.json)
├── results/            # Generated reports
└── package.json
```

## Collection Formats

### Postman Collections
Standard Postman v2.1 format with `item` array.

### Requestly Collections  
Both old format (`requests`) and new format (`records`) supported.

### Simple Array Format
```json
[
  {
    "name": "Test Name",
    "method": "GET",
    "url": "{{base_url}}/api/endpoint"
  }
]
```

## Environment Files

```json
{
  "values": [
    {
      "key": "API_BASE_URL",
      "value": "https://api.example.com"
    },
    {
      "key": "access_token", 
      "value": "your-token"
    }
  ]
}
```

## JSON Validation Rules

Add validation rules directly in collection items:

```json
{
  "name": "API Test",
  "request": { ... },
  "validation": [
    {
      "type": "responseCode",
      "code": 200,
      "message": "API returns success"
    },
    {
      "type": "hasProperty", 
      "path": "data",
      "message": "Response contains data"
    },
    {
      "type": "arrayLength",
      "path": "data",
      "message": "Data is an array"
    },
    {
      "type": "fieldExists",
      "arrayPath": "data",
      "field": "id",
      "message": "Items have ID field"
    }
  ]
}
```

## Output

- **Console**: Real-time test execution with colored output
- **JSON**: `results/api-test-results.json` with detailed statistics
- **HTML**: `results/api-test-report-{env}.html` with visual report

## Performance

- Parallel execution reduces total test time significantly
- Unique response file naming prevents conflicts
- Optimized for high-volume API testing

## License

UNLICENSED - Proprietary software