You send 101 requests in 1 minute to an API with a rate limit of 100 requests per minute. What HTTP status code should you expect on the 101st request?
Think about the standard HTTP response for rate limiting.
The HTTP status code 429 indicates the client has sent too many requests in a given amount of time, which matches the rate limit scenario.
You want to verify that the response header X-RateLimit-Reset exists and is a valid UNIX timestamp in your Postman test script. Which option is correct?
Check that the header exists and is parsed as a number.
Option A correctly checks the header exists, parses it as an integer, and asserts it is a number type.
Given this Postman test script:
pm.test('Detect rate limit exceeded', () => {
pm.expect(pm.response.code).to.equal(429);
pm.expect(pm.response.json().message).to.equal('Rate limit exceeded');
});But the test always fails even when the API returns 429 with message 'Rate limit exceeded'. What is the likely cause?
Consider what happens if pm.response.json() is called on a non-JSON response.
If the response body is empty or not JSON, pm.response.json() throws an error causing the test to fail even if status code is 429.
Choose the best description of why rate limit testing is important in API quality assurance.
Think about why APIs limit the number of requests per user.
Rate limit testing ensures the API enforces limits to prevent overload and protect backend resources.
You want to simulate sending 150 requests quickly to test rate limiting in Postman. Which collection runner setting is best to achieve this?
To test rate limits, you want to send requests as fast as possible.
Setting delay to 0 ms sends requests rapidly to trigger rate limits effectively.