यूनिट टेस्टिंग कोडच्या वैयक्तिक युनिट्स (फंक्शन्स, मेथड्स, क्लासेस) ला अलगावून तपासते — हे तपासते की प्रत्येक लहान भाग स्वतंत्रपणे योग्यरित्या काम करते. यूनिट टेस्ट्स जलद, केंद्रित असतात आणि चांगल्या टेस्टिंग धोरणाचा पाया तयार करतात.
यूनिट टेस्ट म्हणजे काय
A UNIT test verifies the smallest testable piece (a function/method) in ISOLATION:
→ test ONE thing; give inputs, check the output/behavior
→ ISOLATED from dependencies (database, network, other units) — mock/stub those
→ FAST (no real I/O), focused, deterministic
