
Definition: Testing techniques are methods used to design test cases that help find defects (bugs) in software effectively.
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 view and download past papers
Click on Show Past Papers to load available exam papers.