https://bz.apache.org/bugzilla/show_bug.cgi?id=65318

            Bug ID: 65318
           Summary: Incorrect display of decimal numbers in JSON related
                    elements
           Product: JMeter
           Version: Nightly (Please specify date)
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: JMETER_5.5

Created attachment 37869
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37869&action=edit
wrongDisplayOfDecmalNumber

Hello,

In the attached test plan, there are JSON Extractor, JSON JMESPath Extractor,
JSON Assertion, JSON JMESPath Assertion, and Response Assertion elements. There
are several issues found when the test is executed:

1. Provided decimal number is shown as the scientific notation "2.1474836475E9"
in VRT (JSON, JSON Path Tester, and JSON JMESPath Tester), but it should be
"2147483647.5000". Same number is shown if "$.number" or "number" JSON paths
are used in corresponding JSON Testers.
----
2. JSON Assertion shows the message "Value expected to be '2147483647.5000',
but found '2147483647,5'". Expected result should be "2147483647.5000", and
assertion should pass.
----
3. JSON JMESPath Assertion shows the message "Value expected to be equal to
2147483647.5000". From this message it cannot be known what value is evaluated
from the provided path. The expected message could be "Value expected to be
'2147483647.5000', but found '2147483647,5'", same as in JSON Assertion (if the
assertion fails of course). The expected result should be "2147483647.5000",
and the assertion should pass.
----
4. JSON Extractor and JSON JMESPath Extractor extract values as the scientific
notation "2.1474836475E9" so when variables are checked in Response Assertion
they fail. Please check Debug Sampler in VRT. The expected result should be
"2147483647.5000".

IMO, all JSON-related elements should evaluate literal decimal numbers since
they cannot be properly asserted without using a code (String.format() function
for example).

P.S. I use non-English localization settings where the decimal number symbol is
a comma.

Jmeter 5.5 e0e9787
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.

Reply via email to