jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SanderW <>
Subject Re: Increment counter by 1 for each test execution.
Date Thu, 08 Jan 2015 14:26:36 GMT
First of all it's not necessary to ask the same question in multiple old

My suggested way is probably not the most efficient 

You can create your own property-file and use that.
Add the line "" to has 1 entry: runid=5

Create a new testplan with 2 thread groups and on testplan level make sure
"Run Thread Groups consecutively" is checked. 
The first thread group is executed with 1 user and loopcount is 1.
The second thread group contains your script.

In the first thread group you have a beanshell sampler with the following
String value = props.getProperty("sequencenr");
int newvalue = Integer.parseInt(value.trim()) + 1;

// Overwrite the old file with a new sequence number
f = new FileOutputStream("C:/Program
Files/JMeter/2.12/bin/", false);
p = new PrintStream(f);
p.println("runid=" + newvalue);

The second thread group has name Administration${__P(sequencenr)} and
contains your code.

Keep in mind that the changed propery-file will only be used when you
restart JMeter.

View this message in context:
Sent from the JMeter - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message