Monday, October 24, 2022

[SOLVED] Convert curl url request to JMeter script

Issue

I have a requirement to record and perform load test on below CURL URL request from JMeter.

I tried and I'm able to record script if i execute the url only with href="http://localhost/higs/PlatformHIGServlet" rel="nofollow noreferrer">http://localhost/higs/PlatformHIGServlet\

but i want to record the same url which contains post data on url, when i try this in browser i'm getting 404 error but in Curl - 200 ok.

http://localhost/higs/PlatformHIGServlet\?gs_serviceName=xxx\&gs_serviceType=yyy\

Please help me on this,

Thanking You in Advance


Solution

Just record it using JMeter's HTTP(S) Test Script Recorder

  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"
    • Expand Workbench -> HTTP(S) Test Script Recorder and click "Start"
  2. Run curl command using JMeter's HTTP(S) Test Script Recorder as a proxy

    curl -x http://localhost:8888 http://localhost/higs/PlatformHIGServlet
    
  3. Captured request will be available under Test Plan -> Thread Group -> Recording Controller

References:



Answered By - Dmitri T
Answer Checked By - Candace Johnson (WPSolving Volunteer)