Definition: Testing techniques are methods used to design test cases that help find defects (bugs) in software effectively.
👉 In simple words: They tell us how to test a program properly.
Testing techniques are mainly divided into:
Testing Techniques
|
---------------------------------
| | |
Black Box White Box Grey Box
Testing Testing Testing
Black box testing is a technique where the tester does NOT know the internal code and tests only based on inputs and outputs.
👉 Focus: What the system does
Divides input data into valid and invalid groups (partitions).
Age field (valid: 18–60)
| Partition | Type | Example |
|---|---|---|
| <18 | Invalid | 15 |
| 18–60 | Valid | 25 |
| >60 | Invalid | 70 |
Tests values at the edges (boundaries) of input ranges.
Identify limits
Test:
Range: 1–100 Test values: 0, 1, 2, 99, 100, 101
👉 🔥 Frequently Asked!
Used when output depends on multiple conditions.
| Condition | Rule 1 | Rule 2 |
|---|---|---|
| Valid login | Yes | No |
| Correct password | Yes | Yes |
| Output | Login success | Error |
Used when system behavior depends on states.
ATM machine states:
Idle → Card Inserted → PIN Entered → Transaction → Exit
👉 Tests valid & invalid transitions.
Testing technique where the tester knows internal code/logic.
👉 Focus: How the system works
Ensure every line of code executes at least once
if (x > 0)
print("Positive");
👉 Test case must execute this line.
Ensure each decision branch (true/false) is tested
if (x > 0)
print("Positive");
else
print("Negative");
👉 Test both:
Test all possible execution paths
👉 🔥 Very important for exams!
Test loops with:
Focus on variables (data usage)
Combination of Black Box + White Box
👉 Tester has partial knowledge of code
Tests both:
Testing a login system:
Black Box → No code knowledge → Input/Output testing
White Box → Full code knowledge → Logic testing
Grey Box → Partial knowledge → Combined testing
✔ Definition of each technique ✔ Difference between Black Box & White Box ✔ Equivalence Partitioning vs Boundary Value Analysis ✔ Statement vs Branch Coverage ✔ Advantages & disadvantages ✔ Examples of each technique
| Feature | Black Box Testing | White Box Testing | Grey Box Testing |
|---|---|---|---|
| Knowledge of Code | ❌ No | ✅ Yes | ⚠️ Partial |
| Focus | Functionality | Code logic | Both |
| Based On | Requirements | Code structure | Design + Code |
| Performed By | Testers | Developers | Testers/Developers |
| Techniques | EP, BVA, Decision Table | Statement, Branch, Path | Combination |
| Advantage | Easy to perform | Deep testing | Balanced approach |
| Disadvantage | Limited coverage | Complex | Requires skill |
Testing techniques are methods to design test cases.
There are 3 main types:
Important techniques:
Each technique has its own purpose and benefits
Open this section to load past papers