Test Your Web Apps Using the Postman Proxy Shashank Awasthi March 28, 2022 For any web application developer, it’s important to know and test the APIs that power an app. While the APIs and UI can be standalone-tested, it’s important to test both in conjunction and observe the impact that various user interactions have on API flows. Postman’s proxy allows you to intercept the traffic between your web app and backend, enabling you to do a clear-box testing of your web app. Related: What is API Testing? Let’s consider a scenario where you want to test an e-commerce application that you and your team are building. You encounter some issue that is happening during the customer login flow. Doing a proper root cause analysis (RCA) is required so that the issue can be discussed and subsequently fixed. So what’s next? Intercept the traffic using the Postman proxy To do a proper RCA of the issue, you would need to know the data that is flowing between the frontend and the backend of your application. The Postman proxy allows you to capture HTTP traffic flowing between your frontend and backend. You can start capturing traffic by connecting to the proxy and starting a debugging session. The session will allow you to bind the traffic in a certain timeframe. Pro tip: We suggest running your scenario completely and capturing the traffic corresponding to it in one session. You may find it difficult to debug scenarios alone, so your fellow teammates can join you as they see the session in real time in the History while you are running these test scenarios. When analyzing the traffic, you and your teammates can look at various attributes, such as type of requests, response size, response time, and more. E-commerce app debugging session Let’s say you find that for a certain group of your test user IDs the response time and response size are unusually high. What next? Sharing the session with your teammates Give a proper name to your session and ask your developers to refer to the same in the History of your Postman workspace. The teammates from here on can refer to the session, see the particular requests that are having the issues, and replay the same requests within Postman by just clicking on the request URL in the session. This significantly reduces their efforts as they spend minimal time reproducing the error and can quickly fix the issue. Now that your team was able to fix the issue after you performed a proper analysis, you want to ensure that such issues do not occur again. You can now do the following. Generate an automation test out of the session The proxy session can now be saved as a collection where you can add test cases along response time, size, etc. These tests can run on demand using the collection runner, or they can be included in your CI/ CD pipeline using Postman’s CLI tool, Newman. This ensures that the regression issues can be avoided as you keep expanding your application. Regression tests for e-commerce app Try Postman now In this post Tags: Interceptor Product Updates Proxy Proxy Session Testing Shashank Awasthi Shashank Awasthi is a product manager at Postman. View all posts by Shashank Awasthi → Tell us what you think about this feature in a comment below. You can also give product feedback through our Community forum or GitHub repository. Comment Cancel replyYour email address will not be published. Required fields are marked *Your name Your email Write a public comment Δ This site uses Akismet to reduce spam. Learn how your comment data is processed. 3 thoughts on “Test Your Web Apps Using the Postman Proxy” Ben July 30, 2023 What’s an RCA? If you’re going to use an acronym, be sure to define it at least the first time that you use it and don’t assume people know what it is since so many acronyms overlap across so many domains. The Postman Team July 31, 2023 Good point, Ben. We’ve updated the post to clarify that RCA stands for root cause analysis. KBS February 7, 2024 I look forward to hearing from you! Awesome blog by the way! This is Johnson from KBS Technologies. You might also like 502 Bad Gateway: Understanding and Fixing This HTTP Status Code The Postman Team 502 Bad Gateway: You’re testing your API, everything looks fine, and then suddenly you hit a 502 Bad Gateway error. Unlike a… Read more → What is an API Gateway? The Postman Team Quick answer: The API gateway is where every API interaction begins. It manages the flow of requests between clients and backend services,… Read more → Validate APIs During Your Playwright Tests with Postman Khuda Dad Nomani At the time of writing this article, Playwright ships over 8 million npm downloads a week, has over 88,000 GitHub stars, and… Read more →