You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2021/04/27 14:41:27 UTC
[Bug 65269] New: JSON Extractor and JSON JMESPath Extractor Apply to
doesn't work as expected
https://bz.apache.org/bugzilla/show_bug.cgi?id=65269
Bug ID: 65269
Summary: JSON Extractor and JSON JMESPath Extractor Apply to
doesn't work as expected
Product: JMeter
Version: Nightly (Please specify date)
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: Main
Assignee: issues@jmeter.apache.org
Reporter: nalexic@gmail.com
Target Milestone: JMETER_5.5
Created attachment 37834
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37834&action=edit
extractor wrong behavior
Hello,
In the attached test plan, there are Boundary Extractor, JSON Extractor and
JSON JMESPath Extractor. Apply to options "MainSampleAndSubSamples",
"MainSampleOnly" and "SubSamplesOnly" are used and extraction is done on
"JSR223 Sampler - create JSON response" and its subsample that is created using
JSR223 PP. The First 3 extractors of every kind are extracting values from
"JSR223 Sampler - create JSON response" and another 3 from its subsample. The
behavior of Boundary Extractor, JSON Extractor and JSON JMESPath Extractor is
not the same. Please run the test and check Debug Sampler in VRT. Boundary
Extractor works as expected but JSON Extractor and JSON JMESPath Extractor
don't. Please refer to the attached image to see what is correct and what is
wrong behavior.
P.S. Boundary extractor throws WARN message in logs if there is no match
between boundaries.
WARN o.a.j.e.BoundaryExtractor: Boundary Extractor -
BEcategoryFieldSubSamplesOnly: Error while generating result.
java.lang.IllegalArgumentException: bound must be positive
WARN o.a.j.e.BoundaryExtractor: Boundary Extractor -
BEticker_langMainSampleOnly: Error while generating result.
java.lang.IllegalArgumentException: bound must be positive
Is this expected? IMO, it should be hidden like for other extractors.
Jmeter 5.5 08c3c59
Microsoft Windows 10 Enterprise 64-bit
java version "15.0.1" 2020-10-20
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 65269] JSON Extractor and JSON JMESPath Extractor Apply to
doesn't work as expected
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65269
Felix Schumacher <fe...@internetallee.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
OS| |All
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 65269] JSON Extractor and JSON JMESPath Extractor Apply to
doesn't work as expected
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65269
--- Comment #5 from Felix Schumacher <fe...@internetallee.de> ---
The bug id for the boundary extractor is
https://bz.apache.org/bugzilla/show_bug.cgi?id=65352
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 65269] JSON Extractor and JSON JMESPath Extractor Apply to
doesn't work as expected
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65269
eR@SeR <na...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #3 from eR@SeR <na...@gmail.com> ---
(In reply to Felix Schumacher from comment #2)
> @Nikola, could you test next nightly or build from trunk and report back, if
> it fixes your problem?
Hi Felix,
I checked using provided example and real test plan using JSON path and it is
fixed. Works as expected. Thank you.
> Note, I haven't changed Boundary Extractor.
OK. Will it be changed maybe?
Jmeter 5.5 0c97fd6
Microsoft Windows 10 Enterprise 64-bit
java version "15.0.1" 2020-10-20
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 65269] JSON Extractor and JSON JMESPath Extractor Apply to
doesn't work as expected
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65269
Felix Schumacher <fe...@internetallee.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #4 from Felix Schumacher <fe...@internetallee.de> ---
Thanks for confirming the fix.
The boundary extractor will get its own bug report :)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 65269] JSON Extractor and JSON JMESPath Extractor Apply to
doesn't work as expected
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65269
--- Comment #6 from Felix Schumacher <fe...@internetallee.de> ---
commit 75375c0f163894bffb2bd70e62632694acdf4110
Author: Felix Schumacher <fe...@internetallee.de>
AuthorDate: Wed Jun 9 18:09:20 2021 +0200
Skip empty extracted results on JSON Extractor and JSON JMESPath Extractor
With the addition of more than one result for sub-samples, the extracted
results can be empty. Those empty results have to be filtered away, or
we get warnings in the logs.
Part of Bugzilla Id: 65269
---
.../extractor/json/jmespath/JMESPathExtractor.java | 1 +
.../extractor/json/jsonpath/JSONPostProcessor.java | 2 ++
.../jmeter/extractor/TestJSONPostProcessor.java | 22 ++++++++++++++++++++++
.../json/jmespath/TestJMESPathExtractor.java | 14 ++++++++++++++
4 files changed, 39 insertions(+)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 65269] JSON Extractor and JSON JMESPath Extractor Apply to
doesn't work as expected
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65269
Felix Schumacher <fe...@internetallee.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Hardware|PC |All
Keywords| |FixedInTrunk
Status|NEW |NEEDINFO
--- Comment #2 from Felix Schumacher <fe...@internetallee.de> ---
@Nikola, could you test next nightly or build from trunk and report back, if it
fixes your problem?
Note, I haven't changed Boundary Extractor.
commit 0c97fd659f24960a89ff3344b7f71be9e70f1d28
AuthorDate: Sun May 30 20:39:18 2021 +0200
JSON Extractor and JSON JMESPath Extractor ignore sub-samples
The UI for those elements suggest, that the extractors would
look into sub-samples for matches (or even could be configured
to use only values from the sub-samples). Adapt the implementation
to make that assumption true.
Bugzilla Id: 65269
---
.../extractor/json/jmespath/JMESPathExtractor.java | 48 +++++++-----
.../extractor/json/jsonpath/JSONPostProcessor.java | 27 ++++---
.../jmeter/extractor/TestJSONPostProcessor.java | 88 +++++++++++++++++++---
.../json/jmespath/TestJMESPathExtractor.java | 73 ++++++++++++++++++
xdocs/changes.xml | 1 +
xdocs/usermanual/component_reference.xml | 21 ++++--
6 files changed, 213 insertions(+), 45 deletions(-)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 65269] JSON Extractor and JSON JMESPath Extractor Apply to
doesn't work as expected
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65269
--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 37884
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37884&action=edit
Add handling of sub-samples to the JSON Extractors
As the UI suggests, the extractors should handle the selection of sub-samples.
--
You are receiving this mail because:
You are the assignee for the bug.