0

Good afternoon people!

How do I add a call in Curler in Jmeter to get my header to use in tests later?

Which element of test? HTTP request same?

can you help me?

Follow the curl: curl -X POST -vu xxx: b57f4a4f-a455-4014-9ac8-87c6dac7e8d3 https://apibpp.xvv.com.br/api/oauth/token -H "Accept: application / json" -d " password = xxxx & username = yyyy & grant_type = password & scope = read% 20write "

Thank you

Estevao FPM
  • 113
  • 1
  • 9
  • Usually, we use header manager at the top and by enabling or disabling it you can send the header values with all the requests. Do you want to execute the curl command to add header value? Please provide some more clarity. – sunny_teo May 21 '19 at 09:51
  • Hi, @sunny_teo! In fact, I'd like to automate my CURL call to, from the received token, append to header managers. My question is how to automate CURL. It is not a JSON. It's just a call, understand? – Estevao FPM May 24 '19 at 17:11
  • Please check the update, if that helps. – sunny_teo Jun 12 '19 at 06:47

1 Answers1

1

You can use jmeter HTTP recorder to record your curl request. It will provide the request and the required header values.

Please check the below links for more information:-

How to use curl request in JMeter?

testing a curl request with jmeter

You can find many other links for converting curl to jmeter.

Please check if that helps.

Update:- In version 5.1.1, there is an option to import from cURL available under "Tools". Please check if that can help with your requirement. For more info. check here enter image description here

Kindly note that I have never used cURL, so I am just trying to see if you can able to handle it with the features available in the jmeter.

sunny_teo
  • 1,961
  • 1
  • 7
  • 11