Is there a way of easily testing paged responses in Postman?

Ah ok, so it’s only the “getpages” query parameter that needs to be updated in order to get to the next page?
If so, “parameterise” that value and just pull it from the response each time.

If ALL the possible page urls are present in the response from the first request, I’d create an array of “pageurls” and also have a “counter” set to 0 before the first request is made.
Then I’d increase the counter by 1 with each request.
Then in the pre-request script tab I’d do a check that checks if the counter variable is the greater than the array lenth of pageurls then you’d know that you have tested all the page urls in your array.

At least, that’s what I’m doing at the moment until I can think of a better way of doing it xD

I know this pretty text heavy, so I’d be more than happy to show you my code if you want a more practical example.

1 Like