Postman is an excellent tool for functional API testing, ensuring your endpoints respond correctly and meet expectations under normal conditions. However, real-world usage often involves far greater demands than what functional tests simulate. That’s where load testing becomes essential.
With the Gatling-Postman integration, you can seamlessly reuse your Postman collections as the foundation for advanced load tests, without any complex conversions or extra steps. Unlike traditional converters, our integration uses your Postman Collections as they are—no need for tedious format changes. Make updates to your collections, export them, and you’re ready to go.
The integration is now live and available to all JavaScript & TypeScript users, offering full-scale load testing capabilities on Gatling Enterprise!
Prerequisites
In your Postman workspace navigate to the collections menu and press the ellipsis button. At the bottom of the menu select the export option. Export your collection as a v2.1. This downloads a JSON file to your machine.
If you don't already have a Gatling JavaScript Project, head to the open-source downloads page for your free copy:
Unzip the Gating JavaScript project and open it in your favorite IDE. The SDK has JavaScript and TypeScript folders. You can use either, but we will focus on JavaScript for the rest of this post.
import { simulation, constantUsersPerSec } from "@gatling.io/core";
import { http } from "@gatling.io/http";
import { postman } from "@gatling.io/postman";
export default simulation((setUp) => {
const httpProtocol = http;
const collection = postman
.fromResource("yourCollectionName.postman_collection.json");
const scn = collection.scenario("My Scenario", { pauses: 1 });
setUp(
scn.injectOpen(
constantUsersPerSec(1).during(60)
).protocols(httpProtocol)
);
});
npm install --save "@gatling.io/postman"
Remove the Open-source test limits by running your test on Gatling Enterprise with a free trial account. To do so:
This first Postman-Gatling integration opens up new opportunities for efficient API testing workflows. By linking functional tests with performance insights, you can streamline your development process and deliver faster, more reliable APIs.
Our team plans to release additional functionalities including direct connections between your Postman Cloud account and Gatling Enterprise.