Database testing · Accounts table
Bank account number loses its leading zeros (004512339 saved as 4512339)
P2 · MajorIntermediateAccounts 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
Compare what the user typed with what was saved.
Steps to reproduce
- Save a bank account number that starts with 0
- Query bank_accounts
Expected result
004512339, stored as text
Actual result
4512339, because the column is INTEGER
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
Numbers you never do maths on (phone, PIN code, account no.) belong in text columns. Test values that start with 0.
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.