Question

I am currently exploring the stackoverflow api using JMeter.

I would like to count how many times the string question_id has occured in the response (to count the number of the questions)

How should I approach this and what sampler/controller combination should I use?

Was it helpful?

Solution

You will have to use Regex post processor to match occurrences of question_id. refName_gn will then give you number of occurrences of the string you are looking for.

See for details.

http://jmeter.apache.org/usermanual/component_reference.html#Regular_Expression_Extractor

You can checkout this tutorial if you haven't used regex extractor before.

http://my.kpoint.com/kapsule/gcc-e1bad3ad-61cf-4620-9733-e44a74af8a3e/t/regex-extractor-basics-jmeter-tutorial

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top