jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "glinius@live.com" <glin...@live.com>
Subject Re: using the same user for all iterations
Date Mon, 25 Jun 2018 05:47:20 GMT
You can do this using one of  JSR223 Test Elements
<http://jmeter.apache.org/usermanual/best-practices.html#jsr223>   or 
__groovy() function
<https://jmeter.apache.org/usermanual/functions.html#__groovy>  , the
relevant code would be something like:


> new File('test.csv').readLines().get(ctx.getThreadNum())

where *ctx* stands for  JMeterContext
<https://jmeter.apache.org/api/org/apache/jmeter/threads/JMeterContext.html>  
class instance. 

More information on Groovy scripting in JMeter:  Apache Groovy - Why and How
You Should Use It <https://www.blazemeter.com/blog/groovy-new-black>  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Mime
View raw message