Postman is an open source API testing tool. It can work with any given endpoint even if it’s Restful or XML based. It has an easy to use interface to make the request to the given endpoints. It offers a rich variety of features. Creating a collection from requests, extracting data from any response and storing in a variable are the least you can do with Postman.
Postman supports any HTTP request type like the POST, PUT, GET, etc. Let’s see what the key features of a POSTMAN request are. Postman request consists of 5 different sections
The endpoint might work with or without authorization. That’s why Postman supports OAuth 1.0, OAuth 2.0, Basic Auth, etc as an authorization mechanism. For example, in case you need to use your AWS Signature; you can choose AWS Signature from Authorization. Then you just type your AWS region, server name, credentials and you are ready to use it.
Header refers to supplemental data placed at the beginning of a transmitted block of data. Data following the header are sometimes called the payload or body. They define the operating parameters of an HTTP transaction. In case they are not defined properly, a server cannot handle the request properly and it can lead to a failure.
Some basic headers are
Those headers change according to your endpoint’s implementation.
The body represents the data to be sent to the server. It can be a plain text, JSON, XML object or a file.
Pre Request Script
But where does Postman comes into software development lifecycle? During the development process, there’s always a delay between the front end or back-end development. Aligning those teams are challenging. To make QA and Front-end developers’ lives easier Postman provides a Mock Service feature to simulate the backend server. So you can simulate each endpoint in a Postman Collection to view the potential responses, without actually reaching the back end.
All those things make QA engineers’ life easier when it comes to manual testing. But what about test automation? Is it possible to automate Postman script’s execution?
Postman has a great command line tool. It’s called Newman. It can run all those tests by a simple command and you can schedule it with some cron jobs. You might also want to use Jenkins CI to trigger it.
But what about performance testing? When you have a Postman collection having hundreds of requests, it’s not easy to convert it to a JMeter script. Copying and pasting is overwhelming. That’s where Loadium comes into play. We offer Postman users a JMeter converter tool. You can export your Postman v2.0 collections and upload it into our system (https://loadium.com/postman-to-jmeter-converter/) then receive the JMeter file. By the way, we don’t store your collections for security purposes.
Converter creates one HTTP Samplers for a request in Postman. In case there’s a body or headers, it sets them accordingly.
Example Postmand Request
Converted JMeter Sampler
Example Postmand Request Header
Converted JMeter HTTP Sampler Header
But of course, there are some limitations.
- Loadium cannot convert Pre-request Script and Test features of a request. You need to manually configure them according to your need.
- As Postman Collection files don’t store environment variables in the exported JSON file. That’s why Loadium will create JMeter variables so you’ll know which variable to add.
Now, whenever you need to work on a performance testing project, you can simply convert your postman scripts into a JMeter file and create heavy load into your applications.