⚙️ Work in Progress: This project is still under active development. Contributions, feedback, and ideas are highly encouraged!
A simple tool that automatically converts Postman collections into Playwright API tests. It extracts variables, headers, and request data - generating ready-to-run Playwright test files and environment variables for seamless API testing setup.
- 🔄 Convert Postman Collections directly into Playwright API tests.
- 🌍 Extract Environment Variables - automatically adds Postman variables into a
.envfile. - 🧾 Preserve Headers & Payloads from your Postman requests.
- 🧠 Auto-generate Tests using Playwright’s built-in test runner and assertions.
- 🧰 Custom Helpers for assertions and API requests (planned).
You can try out at Postman to Playwright without any local installations. Might be slow since it is hosted on free-tier.
npm install- Run the following command to start the application:
npm start- Open http://localhost:3000 to view the page
- Upload a Postman Collection JSON file
- Click on Convert Collection
- Wait for conversion and click on Download ZIP
- Extract the ZIP and follow the instructions in the README file
Input: Postman request:
{
"name": "Get All Products",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/products/",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"products",
""
]
}
},
"response": []
}Generated Playwright Test:
import { test, expect, request } from '@playwright/test';
import { post, get, put, del } from "@helpers/requestHelper";
test('Get All Products', async ({ request }) => {
const headers = {};
const data = {};
const start = Date.now();
const response = await post(request, `${baseUrl}/api/products/`, data, headers);
const responseTime = Date.now() - start;
expect(response.ok()).toBeTruthy();
expect(responseTime).toBeLessThan(2000);
// No Postman tests found
});Contributions are welcome! Here’s how you can help:
- Clone the repository
- Create a new branch (
feature/my-feature) - Commit your changes
- Open a pull request 🎉
If you find a bug or want to suggest a feature, open an issue.
This tool aims to make transitioning from Postman to Playwright frictionless — especially for QA engineers and developers building automated API testing pipelines.
Dhiraj Raut 💼 LinkedIn
