简体   繁体   中英

how can i store the JsonExtractor return in an array after each http request in Jmeter?

I have a JsonExtractor, which takes the value returned in the "requestprotocolId", I use it in the next Thread Group because this value is passed in the next API request, but when I make 50 requests for example, it will return 50 "requestProtocolId" but they they will not return all at once, it will be one per request, so I want the value returned in this field to be stored in an array at each request, and when I finish the Thread Group and move to the next one I can use all these "requestProtocolId" in the next request, one at a time. Would it be possible?

  1. The next request doesn't have to necessary be in the "next Thread Group", it can be in the same Thread Group, this way you won't have to convert JMeter Variables (which are thread-local ) into JMeter Properties or use Inter-Thread Communication Plugin

  2. If you want to collect 50 "requestprotocolId"s from 50 separate requests into some form of array - it can be done using JSR223 PostProcessor , take a look at the following materials:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM