0

I have data in json file and I previous testing cerrectly sending and receiving this data in Postman. This data are in file json and this is a typical json file. Now I transfer this test to JMeter. Iny my Json file incluge data about event, in which customers can subscribe. and I have one question, how can I do it, that data, which is send in postman (in json file) will be send in JMeter ? and i can testing in JMeter correctly send and receive this data?

2
  • There is no date in JSON. You need to provide details of what you need and tried
    – Ori Marko
    Nov 1, 2018 at 12:50
  • a small error.of course i think about data. Iny my Json file incluge data about event, in which customers can subscribe. Nov 1, 2018 at 13:07

1 Answer 1

1

You can record the request you're executing in Postman using JMeter's HTTP(S) Test Script Recorder

  1. Prepare JMeter for recording. The fastest way is using JMeter Templates Feature

    • From JMeter's main menu choose File -> Templates -> Recording and click "Create"

      enter image description here

    • Expand "HTTP(S) Test Script Recorder" and click "Start"

      enter image description here

  2. Prepare Postman for recording. You need to configure it to use JMeter as the proxy

    • OpenFile -> Settings -> Proxy screen
    • Tick both HTTP and HTTPS protocols
    • Use 127.0.0.1 as the proxy host and 8888 as the proxy port

      enter image description here

  3. Execute the request in Postman

  4. That's it, JMeter should capture it under the Recording Controller

A couple of hints:

  1. If you need to upload the file make sure that the JSON file is present in the "bin" folder of your JMeter installation, otherwise JMeter will not be able to properly capture the request. Check out Recording File Uploads with JMeter guide for more details
  2. If you're sending JSON as request body and want to read the body from the file on your file system you can use __FileToString() function in order to read the file and send it along with the request

    enter image description here

3
  • not exactly, bocuse I have a web socket connection, - web socket sampler by Peter.. so I think, that recording from postman is not necessery. I describe in this stackoverflow.com/questions/53240841/… Nov 11, 2018 at 15:21
  • please help and explain, if read json by WebSocket Simple Write Sampler is enough, or have to be by record from postman. Nov 11, 2018 at 15:22
  • and how I can next process this data Nov 11, 2018 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.