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.
- Host: GitHub
- URL: https://github.com/akrem-chabchoub/api-testing-scripts
- Owner: akrem-chabchoub
- Created: 2024-11-29T14:40:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-29T14:43:20.000Z (over 1 year ago)
- Last Synced: 2025-08-21T03:54:39.840Z (7 months ago)
- Topics: api, postman, scripts, testing
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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);