QuizzifyTech

Bug library › API testing

API testing · Products API

Sort by price (low to high) puts ₹899 after ₹1,299

P3 · MinorIntermediateProducts API

Want to find it yourself first? This page gives away the answer. Play this bug on a fake app screen and see if you can spot it in three tries.

Spot this bug

The clue

Check the order the prices come back in.

Steps to reproduce

  1. Send GET /api/products?sort=price_asc
  2. Check prices go up from top to bottom

Expected result

249, 899, 1299, 1999

Actual result

249, 1299, 899, 1999

Why it matters

This is a minor (P3) bug. It does not stop anyone, but it looks careless and makes people trust the product less. It is usually fixed in a normal sprint.

Testing tip

Check sorting with values of different lengths. Prices sorted as text instead of numbers is a classic cause.

How to find bugs like this

API bugs live in the JSON between the app and the server: wrong records returned, fields that leak private data, bad status codes and limits that are not enforced. When you test, try these checks:

  • Read the whole response body, not only the status code.
  • Ask for other users’ records on purpose.
  • Look for fields that should never leave the server.
  • Send values at and past every limit.

More API testing bugs

See all 158 bugs