An open API service indexing awesome lists of open source software.

https://github.com/akrem-chabchoub/api-testing-scripts

A collection of reusable pre-request and post-request scripts for API testing tools like Postman. Automate workflows with dynamic data generation, authentication handling, and response validation to streamline your testing process.
https://github.com/akrem-chabchoub/api-testing-scripts

api postman scripts testing

Last synced: 24 days ago
JSON representation

A collection of reusable pre-request and post-request scripts for API testing tools like Postman. Automate workflows with dynamic data generation, authentication handling, and response validation to streamline your testing process.

Awesome Lists containing this project

README

          

# 🌐 API Testing Scripts Library

A collection of reusable **pre-request** and **post-request** scripts to automate and enhance API testing workflows. These scripts are adaptable for any API testing tool that supports JavaScript scripting.

## 🚀 Features
- **Dynamic Data:** Generate unique emails, UUIDs, and timestamps.
- **Authentication:** Handle Bearer tokens, OAuth2, and other methods.
- **Validations:** Verify response codes and schemas.
- **Utilities:** Manage environment variables and debug responses.

## 📜 Example Scripts

### Pre-request Scripts
- **Dynamic Email Generation**:
```javascript
let counter = pm.environment.get('email_counter') || 1;
pm.variables.set('email', `test${counter}@example.com`);
pm.environment.set('email_counter', counter + 1);