How do I count the number of samples/values returned by jmeter extractors.
I am using regex to get the list of links to a variable using regex extractor. By debug sampler shows that there many values returned. until like 9_g1
PlanLinksArray_9_g=1
PlanLinksArray_9_g0=/hix/admin/planmgmt/viewqhpdetail/gLe8eM5psNUTqo8aYXo20w
PlanLinksArray_9_g1=/hix/admin/planmgmt/viewqhpdetail/gLe8eM5psNUTqo8aYXo20w
How can i get the count of this to a variable in Jmeter??
You can get extracted variables count as
${PlanLinksArray_matchNr}
it will hold the number of variables like:If you need to include match groups as well, like
you'll have to do some scripting.
Put the following code into the PostProcessor's "Script" area
${extractedValues}
variableSee How to use BeanShell: JMeter's favorite built-in component guide for more Beanshell tips and tricks.