postman-app-support
postman-app-support copied to clipboard
Test: Not able to validate the response size by tests
Is there an existing issue for this?
- [X] I have searched the tracker for existing similar issues and I know that duplicates will be closed
Describe the Issue
not able to validate the response size by tests
Steps To Reproduce
- write the test to validate that the response size is within in limit
Screenshots or Videos
Operating System
Windows
Postman Version
Version 10.13.9-canary01
Postman Platform
Postman App
User Account Type
Signed In User
Additional Context?
No response
We're looking into this, thank you for reporting this bug.
@sseenivasan89 Update the code to use pm.response.responseSize instead of pm.response.size
@sseenivasan89 As @daniyalfarman mentioned, the right usage is pm.response.responseSize. You can find the reference for scripting with response data here: https://learning.postman.com/docs/tests-and-scripts/write-scripts/postman-sandbox-api-reference/#script-with-response-data