Database testing · Orders table
Two different orders share id 7002
P1 · CriticalBeginnerOrders 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
An id should be unique.
Steps to reproduce
- Place two orders at the same moment
- Query the orders table
Expected result
Every order has its own id (primary key)
Actual result
Amit’s and Neha’s orders both have id 7002
Why it matters
This is a critical (P1) bug. It can lose money, expose private data or stop people from finishing a key task. A bug like this should block a release and be fixed straight away.
Testing tip
Duplicate ids mean the table has no primary key, or ids are made in app code. Either way, lookups can return the wrong order.
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.