mercredi 4 avril 2018

Jmeter: iterate and increment with every request then go back

I have JDBC request that returns a string like: "this is an example". I want to be able to split that string by character (i.e: var_1=t, var_2=h, var_3=i, etc..) and the iterate them in a HTTP Request. Not only iterate, but increment the search pattern every request and then decrease at the end like:

  1. request: t
  2. request: th
  3. request: thi
  4. .....
  5. request: thi
  6. request: th
  7. request: t

right now I am using a thread group composed of jdbc request, jsr223 sampler(I've tried with beanshell sampler also but with no success either..), a forEach controller to iterate trough the values, a http request and a response assertion. I haven't been able to make it work because I got stuck at the jsr223 configuration. I guess the right beanshell script would fix this but I suck at groovy script..

Aucun commentaire:

Enregistrer un commentaire