QuizzifyTech

Bug library › Database testing

Database testing · Reports

Orders-per-user report drops users with 0 orders (INNER JOIN)

P2 · MajorExperiencedReports

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

There are 5 users. Count the rows in the report.

Steps to reproduce

  1. Create a user with no orders
  2. Run the orders-per-user report

Expected result

5 rows, including the user with count 0 (use LEFT JOIN)

Actual result

4 rows: the user with no orders is missing

Why it matters

This is a major (P2) bug. The feature still works in part, but users get wrong information or a broken step, and many will notice. It should be fixed before or soon after release.

Testing tip

Count the rows a report should return before you run it. INNER JOIN quietly drops anything without a match.

How to find bugs like this

Database bugs show up when you look at the tables: duplicate rows, joins that double totals, deleted users still active, values cut short or saved in the wrong type. When you test, try these checks:

  • Run the query yourself and count the rows.
  • Look for duplicates that differ only in case or spaces.
  • Check deleted and archived records.
  • Compare stored values with what the user typed.

More Database testing bugs

See all 158 bugs