Reputation: 443
I have set up a CSV DataSet Config in a Test plan which contains UserName and Password UserName,Password Anil,Test@123 Sunil,Test@123
How can I access these variables in JSR223 preprocessor ?
Upvotes: 0
Views: 1610
Reputation: 168072
Use vars
shorthand for JMeterVariables class instance like:
def username = vars.get('UserName')
def password = vars.get('Password`)
See Top 8 JMeter Java Classes You Should Be Using with Groovy article for more details on this and other JMeter API shorthands available for JSR223 Test Elements
Pass the variables via Parameters section and access them as args[0]
and args[1]
Demo:
Upvotes: 1