问题
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:
Electron App -> JMeter -> Proxy_A -> Backend
- 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:
- Import JMeter's self-signed certificate to your proxy or OS so JMeter would be able to decrypt secure traffic
- Set up proxy on OS level
- 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