I have a question in Jmeter!
I have a script in a JDBC request (INSERT).
One of the data must be dynamic. Each time I call, the last character of the data must be sequential (1, 2, 3, 4, 5...). Example "XXXHDLALA01", "XXXHDLALA02", "XXXHDLALA03", etc.
The data would be the same every time I insert, but I would only change the last characters, because they are sequential numbers. The data is as follows:
ACTC104_04358798_20220202_00001
I need to change only the last one (ACTC104_04358798_20220202_00001, ACTC104_04358798_20220202_00002, ACTC104_04358798_20220202_00003, ACTC104_04358798_20220202_00004...)
Can I do this using some kind of regex?
Thanks in advance!
CodePudding user response:
In the JDBC Test Element use ${counter} as the postfix for the dynamic part:
ACTC104_04358798_20220202_${counter}
Demo:
You may also want to use __time() function as well because 20220202 looks like current date to me
ACTC104_04358798_${__time(yyyyMMdd,)}_${counter}
More information: How to Use a Counter in a JMeter Test


