postman-app-support icon indicating copy to clipboard operation
postman-app-support copied to clipboard

Test: Not able to validate the response size by tests

Open sseenivasan89 opened this issue 2 years ago • 3 comments

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

  1. write the test to validate that the response size is within in limit

Screenshots or Videos

image

Operating System

Windows

Postman Version

Version 10.13.9-canary01

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response

sseenivasan89 avatar Jun 13 '23 11:06 sseenivasan89

We're looking into this, thank you for reporting this bug.

SterlingChin avatar Jun 13 '23 14:06 SterlingChin

@sseenivasan89 Update the code to use pm.response.responseSize instead of pm.response.size

Image

daniyalfarman avatar Mar 19 '25 15:03 daniyalfarman

@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

abhijeetborole avatar Mar 19 '25 16:03 abhijeetborole