I found that the problem is there is no transaction sample result in the
prev variable, I used an BSF assertion and beanshell timer to make the
"transaction timer" that I need:
BSF Assertion:
sleep=0;
if (SampleResult.getURL() == null) {
sleep = (10000 - SampleResult.getTime()) * Math.random();
vars.put("RT", sleep.toString());
//print(sleep);
} else {
sleep = 0;
vars.put("RT", sleep.toString());
}
//print(SampleResult.getTime());
//print(SampleResult.getURL());
BeanShell Timer:
st=vars.get("RT");
t=Float.parseFloat(st);
t2=t.intValue();
print(t2);
return t2;
Is there a way that I can get the SampleResult variable in the timer
directly?
And another question is, is every thread execute all the samplers
sequentially? Because when a real user using a browser to access web sites,
there will be several connections downloading elements of a web page
concurrently. I'm wondering how to simulate this with JMeter? Thanks!
--
View this message in context:
http://jmeter.512774.n5.nabble.com/How-to-get-transaction-time-into-a-user-defined-variable-tp3328587p3334971.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]