Loading…
Loading…
The catalog endpoint accepts sort and direction:
1GET /api/products?sort=price&direction=ascYou observe that with direction=asc the most expensive product comes first, and with direction=desc the cheapest comes first. Every other aspect of the response — the items returned, the meta.total, the page size — is correct.
You check the requirement. It says only:
"Users can sort the catalog by name, price, rating, or newest."
The word "direction" does not appear anywhere in the requirement, nor does "ascending" or "descending". The API documentation lists the parameter and its allowed values but does not define what they mean.
Your task: state whether you file this as a defect, and against what. Then describe the oracle you would use, and what you would do if the developer replies "that is the intended behaviour, asc means the ascending direction of the sort ranking, so highest price is rank 1."
Write your own answer first — the defect report, the case table, the locator, whatever the question asks for. An interviewer grades your reasoning, not your recall.
Practice this live with an AI interviewer
Starts a QA mock interview pre-filled with this problem — you can edit the brief before starting.