2

I'm new here and also a beginner on JMeter and maybe this was already answered in an old post that I didn't find, sorry if this is the case.

I had this Post request I need to send with all these IDs that vary according to the account Post Request In order to get all of the IDs, I used the JSon extractor to put then into a variable JSon extractor, then I got all the FieldIDs that I need. ID extracted

But now how can I add this variable inside the request? I tried something like {"ids":"${fieldId}","includeBoundary":true} but it didn't work. How can I use this? Please see: HTTP Request parameter dialog example

2 Answers 2

2

I solved my problem in a so easy way(damn it)!!!!

On the Json extractor I just marked the option "Computer concatenation var (suffix_ALL)" then on the debbuger I got all IDs I needed in only one line and finally on my request I just add on the body data the line {"ids": [${fieldId_ALL}],"includeBoundary":true} and bingo it worked like a charm!!!!

Sign up to request clarification or add additional context in comments.

Comments

1

If you need to extract the whole response, save it into a JMeter Variable and send it back to another endpoint - the easiest way is using Boundary Extractor providing empty left and right boundaries

enter image description here

If you need more complex transformations - take a look at JSR223 Test Elements and Groovy language

2 Comments

I saw your post blazemeter.com/blog/advanced-usage-json-path-extractor-jmeter and my problem is like In the first example you gave: firstName_1=John firstName_2=Anna firstName_3=Peter firstName_matchNr=3 How can you pass all these names at once in a body data? this is kind of my problem, I'm getting some field_IDs that is random because it dapends the account I'm using. fieldId_1=32664922 fieldId_2=32532081 fieldId_3=32532082 fieldId_matchNr=3 But how can I pass all of them in a simple way knowing that the number of ids is different depending on the user I'm logged?
this works, but how can I ignore the quotation marks in the form of my token "token

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.