यूनिट टेस्टिङले कोडका व्यक्तिगत यूनिटहरू (फङ्क्शनहरू, मेथडहरू, क्लासहरू) अलगअलगमा परीक्षण गर्छ — प्रत्येक साना भागले आफैंमा सही तरिकाले काम गरेको हो भनी जाँचेर। यूनिट टेस्टहरू द्रुत, केन्द्रीभूत, र राम्रो टेस्टिङ रणनीतिको आधार हुन्।
यूनिट टेस्ट भनेको के हो
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
