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

Display name
  • 1,228
  • 1
  • 18
  • 29

2 Answers2

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!!!!

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

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • I saw your post https://www.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? – Ramon Gorge Mar 26 '21 at 14:20
  • this works, but how can I ignore the quotation marks in the form of my token "token – Gülsen Keskin Dec 14 '21 at 13:37