Reputation: 1149
My Architecture is like this:
From JsonPath I extract all the programID's like:
When Executed is like this:
The question is: How to tell the while controller is loop until programId 80?
What I tried is:
Any help is appreciated
Upvotes: 0
Views: 400
Reputation: 1149
Thanks Dmitri T for your direction. The honey for me in this case was the alteration the JSON path expression to:
$..pageItems[?(@.programId>80)].programId
Like this I was able to filter all the programId higher than 80.
Upvotes: 0
Reputation: 167992
I think correct __groovy() function would be something like:
${__groovy((vars.get('programId_' + vars.get('Counter')) as int) > 80,)}
in general I wouldn't recommend inlining JMeter Functions or Variables into Groovy scripts as it's bad for performance and may cause issues, go for code-based equivalents instead, in the above example vars
stands for JMeterVariables class instance, see Top 8 JMeter Java Classes You Should Be Using with Groovy
A better option would be amending your JSONPath query to return IDs which are above 80, see Filter Operators
Upvotes: 1