Test Your Web Apps Using the Postman Proxy
Tags: api, news, testing, tutorial
Published: 2022-03-30 06:49:56

---
title: Test Your Web Apps Using the Postman Proxy
published: true
date: 2022-03-28 23:18:44 UTC
tags: api, news, testing, tutorial
canonical_url: https://blog.postman.com/testing-web-app-using-postman-proxy/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d4ziabuo1x0n10787beg.png
---

For any web application tester, 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 the API flows. Postman’s proxy [allows you to intercept the traffic](https://dev.to/jansche/enhanced-http-traffic-capture-and-analysis-in-postman-2ci4-temp-slug-8145618 "https://blog.postman.com/http-traffic-capture-and-analysis-in-postman/") between your web app and backend, enabling you to do a white box testing of your web app.

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 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 front and the back end of your application. The [Postman proxy](https://learning.postman.com/docs/sending-requests/capturing-request-data/capturing-http-requests/#using-the-postman-proxy "https://learning.postman.com/docs/sending-requests/capturing-request-data/capturing-http-requests/#using-the-postman-proxy") allows you to capture HTTP traffic flowing between your frontend and the backend. You can [start capturing traffic](https://learning.postman.com/docs/sending-requests/capturing-request-data/capturing-http-requests/#using-the-postman-proxy "https://learning.postman.com/docs/sending-requests/capturing-request-data/capturing-http-requests/#using-the-postman-proxy") by connecting to the proxy and starting a [debugging session](https://learning.postman.com/docs/sending-requests/capturing-request-data/capturing-http-requests/#step-2-start-the-proxy-debug-session "https://learning.postman.com/docs/sending-requests/capturing-request-data/capturing-http-requests/#step-2-start-the-proxy-debug-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**](https://learning.postman.com/docs/getting-started/navigating-postman/#history "https://learning.postman.com/docs/getting-started/navigating-postman/#history") while you are running these test scenarios.

Wen analyzing the traffic, you and your teammates can look at various attributes, such as type of requests, response size, response time, and more.

![](https://blog.postman.com/wp-content/uploads/2022/03/Screenshot-2022-03-28-at-12.46.24-PM.png)
_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 were 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 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](https://learning.postman.com/docs/designing-and-developing-your-api/testing-an-api/ "https://learning.postman.com/docs/designing-and-developing-your-api/testing-an-api/") along response time, size, etc. These tests can run on demand using the [collection runner](https://learning.postman.com/docs/running-collections/intro-to-collection-runs/ "https://learning.postman.com/docs/running-collections/intro-to-collection-runs/"), or they can be included in your CI/ CD pipeline using Postman’s CLI tool, [Newman](https://learning.postman.com/docs/running-collections/using-newman-cli/command-line-integration-with-newman/ "https://learning.postman.com/docs/running-collections/using-newman-cli/command-line-integration-with-newman/"). This ensures that the regression issues can be avoided as you keep expanding your application.

![](https://blog.postman.com/wp-content/uploads/2022/03/Screenshot-2022-03-28-at-12.52.27-PM.png)
_Regression tests for e-commerce app_

The post [Test Your Web Apps Using the Postman Proxy](https://dev.to/sahuvikramp/test-your-web-apps-using-the-postman-proxy-pj4-temp-slug-5384962) appeared first on [Postman Blog](https://blog.postman.com) by Shashank Awasthi.