BruisedLee
BruisedLee

Reputation: 41

Postman integration with JMeter

I'd like to point out that this current question is a follow-up to an earlier post that talks about using Postman in conjunction with JMeter. That other thread can be found here: Postman script to JMeter script

Anyways, the original thread suggested that JMeter could record the traffic that a Postman collection would trigger by following the below procedures:

1- Launch Postman and setup the proxy server under File>Settings>Proxy to use port as localhost:8087.

2- Launch JMeter tool, open recording template and setup the proxy to use the port '8087' under 'HTTP(S) Test Script Recorder' element (same port that is set in Postman)

3- Now all the API requests that you send in Postman will be captured in JMeter and store under Thread Group>Recording Controller.

I've tried to setup the proxy in Postman but that doesn't work for me (unless I'm missing something).

When I run a collection with no proxy defined, I get the responses just fine. But when I flip the "custom proxy" on (using localhost:8087), I get this error:

Error: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:8087

I've gone through some solutions posted on GitHub but with no success. If its any relevant, I'm on Windows 7. Anyone familiar with this behavior?

Upvotes: 4

Views: 5261

Answers (1)

Dmitri T
Dmitri T

Reputation: 168217

The error you're getting means that Postman is not capable of connecting to JMeter, so please double check that:

  • HTTP(S) Test Script Recorder is really configured to use port 8087
  • HTTP(S) Test Script Recorder is started

If you would like to start from scratch:

  1. Prepare JMeter for recording. The fastest and the easiest way is using JMeter Templates feature. From JMeter's main menu choose File -> Templates -> Recording and click Create

    enter image description here

  2. Change Port to 8087 and click "Start"

    enter image description here

  3. If you still experience any problems - look into jmeter.log file.
  4. It might also be the case you will need to install JMeter's self-signed certificate into Postman

Upvotes: 3

Related Questions