When Postman Goes That Extra Mile to Deliver Performance to APIs

Postman is an API platform for building, using and testing APIs. Postman aims to simplify each step of the API lifecycle and streamlines collaboration so you can create better APIs. This article provides an introduction to the different features of using Postman as a test automation tool during the software testing activities related to API creation and management.

Author: Rini Susan V S, https://www.linkedin.com/in/rinisusan/

Background

Postman is an API platform for building and testing Application Programming Interfaces [API]. Postman streamlines the stages in the API lifecycle and promotes collaboration to generate APIs, better and faster. Postman supports API development with the API Builder and also provides the option to write scripts to perform API tests. Postman has a Collections feature that helps to organize a group of saved API requests. Postman also provides integrations with various CI/CD, APM, Cloud, and Collaboration tools like Jenkins, Splunk, NewRelic, AWS API Gateway, GitHub, Slack, etc.

When Postman Goes That Extra Mile to Deliver Performance to APIs

Wikipedia defines software testing as, an investigation conducted to provide stakeholders with information about the quality of the software product or service under test. Performance testing is a type of testing in which the speed, responsiveness, and stability of a software, product, or network is evaluated under peak workload. Performance testing checks and validates an application’s capacity and ensures that it works well within the acceptable Service Level Agreements.

API Performance Testing

Performance testing is done to evaluate API performance and system capacity under expected traffic/load. It helps to identify performance bottlenecks under unusual traffic. Some of the essential information regarding API performance testing is provided below,

  • Types of APIs tested – REST, SOAP
  • Types of API performance tests – Smoke, Load, Stress, Spike, Endurance
  • Tools used for API testing – Postman, SoapUI, Apache JMeter, LoadRunner, Gatling

Performance Testing using Postman 

The performance testing feature in Postman is designed to test the API endpoints under varying loads and to assess how well the APIs handle different loads. Accordingly, potential performance bottlenecks in API can be identified and performance-tuning recommendations can be provided by the performance team. It helps to optimize and enhance the overall API performance.

When Postman Goes That Extra Mile to Deliver Performance to APIs

Currently, the load profile feature in the tool enables testers to execute performance tests with fixed, ramp up, spike, and peak loads. The data file feature enables the testers to use the dataset file required to load test API with different data sets in each iteration.

When Postman Goes That Extra Mile to Deliver Performance to APIs

Test Monitoring

Load test execution can be monitored in real-time through the Postman Summary tab. A summary of performance metrics is available in tabular and graphical format and includes test duration, virtual user count, the total request count, requests/second, average response time, and errors of APIs.

When Postman Goes That Extra Mile to Deliver Performance to APIs

Test summary will be displayed after execution in the Summary tab as shown below.

When Postman Goes That Extra Mile to Deliver Performance to APIs

Test Report

Reports are generated after test execution and can be downloaded in pdf or html format. Test dashboard details can also be shared as a link.

When Postman Goes That Extra Mile to Deliver Performance to APIs

When Postman Goes That Extra Mile to Deliver Performance to APIs

Details of each performance metric are also available in the test report. Transaction response time and throughput are displayed in graphical format, while the top 5 requests with the slowest response times and errors are displayed in tabular format.

When Postman Goes That Extra Mile to Deliver Performance to APIs

When Postman Goes That Extra Mile to Deliver Performance to APIs

Error Analysis

Detailed error analysis is available in the Errors tab and provides information about the API name, error class, error code, number of errors, and data set that caused the error. The error code and error class help testers easily identify the root cause of the error, whether it is an issue caused by incorrect data or a code error. In case of a data issue, the ability to view the request and response of the specific error request in the Error tab is very beneficial. It helps to pinpoint the exact data that caused the error during execution.

When Postman Goes That Extra Mile to Deliver Performance to APIs

Closing Thoughts

The Postman tool provides options to develop and test different aspects of API efficiently. The tool improves collaboration; team members can collaborate in team workspaces to develop and test different aspects of API. To sum up, the performance testing capability introduced in the Postman is a valuable feature that enhances the overall scalability feature of API. It provides option to reuse existing API collections for performance testing with minimal effort. From a testing tool standpoint, there is still scope for improvement in terms of features and capabilities.

Beneficial Aspects

  • The performance test team can use the API collections created by the development or functional testing team as a base and make necessary modifications. It would reduce the overall scripting effort and time taken in the project.
  • The capability to test with 100 virtual users even in the Postman Free plan is very beneficial for small projects with budget and resource constraints.
  • The test reports available in shareable PDF and HTML formats help in easy test reporting and analysis.

Areas of Improvement 

  • Timer features to manage the frequency of requests based on test requirements and sleep time option to introduce a delay between the requests to emulate real-world scenarios are unavailable, unlike other load-testing tools.
  • The test scenario can have only one data file, which is an unlikely scenario in load testing. Normally, load test scenarios have multiple data set files and require options to control and format the data.

References

https://www.postman.com/product/what-is-postman/

https://learning.postman.com/docs/introduction/overview/

About the Author

Rini Susan V S is a senior quality engineer with nearly 15 years of professional experience, mainly in software Performance Testing and Engineering. She has extensive working knowledge of Performance testing, Application monitoring, DevOps, Profiling, and CI/CD tools. Rini is a regular contributor to technical blogs and articles and has co-authored an article published on developer.com.

1 Trackbacks & Pingbacks

  1. Software Development Linkopedia March 2024 - Agile Metrics

Comments are closed.