Nepal Police2080 BSQuestion 8 of 14
Why software testing is a necessary step in SDLC? Differentiate between White-box testing and Black-box testing technique.
5 marks
Question source
- Exam year
- 2080 BS / 2024 AD
- Level
- Sub-Inspector (Prabidhik – IT/Computer)
- Paper
- Paper II – Professional and Service Specific Test
- Section
- Section B
Model answer
SDLC (Requirement → Design → Code → Test → Deploy → Maintain) needs testing because fixing a bug after deployment costs far more than catching it early, and police systems cannot afford wrong FIR or salary errors.
Why necessary: Finds defects, verifies requirements, ensures security, and builds trust before citizens use the portal.
| Basis | White-box | Black-box |
|---|---|---|
| Knows code? | Yes — tests internal logic/paths | No — tests inputs vs expected outputs |
| Done by | Developers | Testers/users |
| Example | Check all IF branches in login function | Enter wrong password → "Invalid login" shown? |
| Catches | Logic, loop, security holes | Missing features, UI, requirement gaps |
Good projects use both: white-box during coding, black-box before release (UAT).