Reputation: 24962
What I'm trying to do is pass variable between the threads in JMeter - so one thread modify this value and next one will get it - please look at this structure:
Test Plan
User Defined Variables
Thread Group 1
BSF PreProcessor
Thread Group 2
HTTP Request
User Defined Variables:
Name: myvar
Value: foo
Thread Group 1 -> BSF PreProcessor:
Script: vars.put("myvar","users");
Thread Group 2 -> HTTP Request:
Path: /api/${myvar}
What I've got from Thread Group 2 step - variable myvar
with default value:
${myvar} == foo
but I want to persist value assigned to variable myvar
in Thread Group 1 step so in Thread Group 2 I will get:
${myvar} == users
Upvotes: 2
Views: 6973