You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When accessing a value from response.json() into the test script, the value is not corresponding to the one you can read on the response body into the web interface (which is the correct one).
You can see what is happening checking the following screenshots.
I tried to change the way I'm parsing the Json body (pm.response.json() or JSON.parse(responseBody) but the result is the same).
Can it be anything related to the Long value size? (which is valid in my Java API application)
Expected behavior
Values should be the same !!
Screenshots
App information (please complete the following information):
Native OSx APP: V. 6.5.2
The text was updated successfully, but these errors were encountered:
Hi @mmornati, the test scripts run in a javascript sandbox and maximum values an integer can hold in javascript is +/- 9007199254740991
Currently, BigInt support in javascript is in stage-3 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt so as and when javascript starts supporting such large integers the test scripts in Postman will also be able to.
As an alternative, we can suggest, you could perform string-based comparisons with Regular Expression using pm.response.text()
Describe the bug
When accessing a value from response.json() into the test script, the value is not corresponding to the one you can read on the response body into the web interface (which is the correct one).
You can see what is happening checking the following screenshots.
I tried to change the way I'm parsing the Json body (pm.response.json() or JSON.parse(responseBody) but the result is the same).
Can it be anything related to the Long value size? (which is valid in my Java API application)
Expected behavior
Values should be the same !!
Screenshots



App information (please complete the following information):
The text was updated successfully, but these errors were encountered: