Database testing · Orders table
Paid order 103 has a NULL total
P2 · MajorBeginnerOrders table
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.
The clue
Every paid order should have an amount.
Steps to reproduce
- Place and pay for an order
- Query the orders table
Expected result
Every paid order has a total, and the column is NOT NULL
Actual result
Order 103 is paid with total NULL
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
NULLs break sums and reports quietly. Check required columns have NOT NULL rules and test with missing values.
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.