As reported in PR 235 on github, JSON Processor leaves old variables when extracting new ones. That can lead to weird behaviour in ForEach loops. This bug can be triggered for example by the following flow: 1. JSON Processor is configured to extract all members of an array and finds the specified path in the result. It will fill the vars REF, REF_matchNr and REF_Xs 2. JSON Processor is still configured to extract all members, but gets an empty result to extract from. It will remove REF, but REF_matchNr and REF_Xs will be left untouched. Another bug, that was uncovered while working on this one, was that the Processor wrongly filled REF_matchNr with "1" without filling REF_1 when configured to extract a random match (match number = "0"). The correct behaviour here seems to be to not fill REF_matchNr at all.
Date: Thu Dec 1 18:39:36 2016 New Revision: 1772247 URL: http://svn.apache.org/viewvc?rev=1772247&view=rev Log: Clear leftover variables before extracting new ones in JSON Extractor. Based on a patch by Qi Chen (qi.chensh at ele.me) This closes #235 on github. Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java jmeter/trunk/test/src/org/apache/jmeter/extractor/TestJSONPostProcessor.java jmeter/trunk/xdocs/changes.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4182