Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

236
Vistas
Is it possible to store each return of the same http request in an array in jmeter?

In my post processor I have the following code:

if (i as Integer < protocolsArray.length){


          
protocolsArray[i as Integer] = "${requestProtocolId}" ;

}

and it worked, I put the "requestProtocolId" that I got via JsonExtractor in the position of "i", position of i == 0

but the number of virtual users defined in this http request is greater than one.

so it sends the request again and saves the new "requestProtocolId" again in position zero, overwriting the other protocol,I understand that with the new request it starts all over again, taking the initial values ​​assigned to the variables again, but I've already tried incrementing the i (i ++) and returning the new array with the zero position filled in:

vars.putObject("protocolsArray", protocolsArray);

but it always returns the value set before the htpp request, is there a way to change that?

If I changed and put an iteration controller and it was a group of users but in iteration controller "5", it would be like the same user would send it five times, right?

I wanted to simulate different users, but always keep the "requestProtocolId" value saved in the array positions because I'm going to use it in another request.

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

In its current state your question doesn't make a lot of sense.

  • JMeter Variables are local to the thread (virtual user)
  • If the user starts new iteration - the variable will be still there, if this is not something you want/expect - use vars.remove() function to ensure that the variable is always "fresh"
  • Don't inline JMeter Functions or Variables in scripts, in case of Groovy (the recommended scripting option) only first occurrence will be cached and used during other iterations, see JSR223 Sampler documentation for more information
about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda