Use JMeter Proxy against specific Proxy to record requests

谁说胖子不能爱 提交于 2021-01-29 08:51:13

问题


I have an Electron App which should be started through Proxy Proxy_A. I Would like to make a Loadtest to the Backend. To my basic understanding when I want to record the request using JMeter, I should configure a script recorder which creates a proxy Proxy_B on its own. I should then use JMeter proxy as a proxy to my app so that the traffic could be recorded. Now I am little bit lost. How could I tell JMeter to accepts and forwards the request from my Proxy_A to JMeter Proxy Proxy_B?

Edit thanks to Dmitri T

What I am trying to do is described as per the attached screenshot

When I start JMeter with the proxy as per

jmeter -E https -H ACTUAL_PROXY_URL -P ACTUAL_PROXY_PORT

and I start the JMeter Proxy to record requests from localhost:9000

Then I can not record requests when I start recording. When I point my browser to localhost:9000 I become the error

500 Internal server error

回答1:


In order to be able to record traffic from the Electron app to the backend you need to pass JMeter between the Electron app and the backend, for example:

  1. Electron App -> JMeter -> Proxy_A -> Backend
  2. or Electron App -> Proxy_A -> JMeter -> Backend

Exact instructions will differ depending on the approach and the software you use, i.e. if it's possible to configure the proxy server for the Electron app you can set it to use JMeter and configure JMeter to use Proxy_A as the upstream proxy

If it's possible to configure Proxy_A to use some upstream proxy just point it to JMeter's host/port combination.

Also you might need to perform the following steps:

  1. Import JMeter's self-signed certificate to your proxy or OS so JMeter would be able to decrypt secure traffic
  2. Set up proxy on OS level
  3. If you will be running the Electron app and JMeter on the same physical Windows machine you might need to install loopback adapter

More information on the above steps: How to Run Performance Tests of Desktop Applications Using JMeter



来源:https://stackoverflow.com/questions/62757728/use-jmeter-proxy-against-specific-proxy-to-record-requests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!