Hi,
I am having problem using __StringFromFile in a bean shell. My requirement
is to use the first line of the file 20 times and go for next line when the
counter rest to 0. I have my bean shell sampler in while controller. If the
function is out side of if condition it returns next line of the file for
each iteration. But if the function is in side if condition it returns first
line agin after the if condition satisfied. I appreciate your help.
int counter = Integer.parseInt(vars.get("keyCounter"));
apiKey="dummy";
if ( counter == 0 ) {
apiKey="${__StringFromFile(/DataSource/API_KEYS.csv)}";
}
else {
apiKey = vars.get("nextAPIKey");
}
vars.put("nextAPIKey",apiKey);
--
View this message in context:
http://jmeter.512774.n5.nabble.com/StringFromFile-behavior-changes-with-if-condition-in-Bean-Shell-tp5721737.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]