Hi sebb! I tried to do it in the following way:

import org.apache.jmeter.control.TransactionSampler;
import org.apache.jmeter.control.TransactionController;
import org.apache.jmeter.util.JMeterUtils;

TransactionSampler ts = new TransactionSampler();

//print(ts);

sp = ctx.getCurrentSampler();

print("sampler:"+sp);

ct = JMeterUtils.getControllers(sp);

print("controller:"+ct);

previous = ts.getTransactionResult();

print("haha"+previous);

tt=previous.getTime();

print(tt);

But I can't the right properties of sampler... I also tried to create a new
instance of Transaction Controller, it also doesn't work... I don't know how
to get the results in transactions. Could you help to take a look? Thanks!
-- 
View this message in context: 
http://jmeter.512774.n5.nabble.com/How-to-get-transaction-time-into-a-user-defined-variable-tp3328587p3331734.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]

Reply via email to