0% found this document useful (0 votes)
30 views4 pages

1 Unit Testing

Unit testing involves testing individual software modules to check that each component functions correctly. The document discusses unit testing as a phase of software testing that is typically done by developers to test their code modules independently before integration testing. Unit testing catches bugs early, supports making changes to code with confidence, and helps programmers work efficiently by isolating problems to specific code units.

Uploaded by

PRADEEPRAJA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views4 pages

1 Unit Testing

Unit testing involves testing individual software modules to check that each component functions correctly. The document discusses unit testing as a phase of software testing that is typically done by developers to test their code modules independently before integration testing. Unit testing catches bugs early, supports making changes to code with confidence, and helps programmers work efficiently by isolating problems to specific code units.

Uploaded by

PRADEEPRAJA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 4

Testing in General

 Testing
 A way of showing the correctness of software
 Phases
 Unit testing
 To test each module (unit, or component)
independently
 Mostly done by developers of the modules
 Integration and system testing
 To test the system as a whole
 Often done by separate testing or QA team
 Acceptance testing
 To validate system functions for (and by)
customers or user

1
What Is Unit Testing?
 Definition
 Testing is the process of showing that a
program works for certain inputs.
 A unit is a module or a small set of modules.
 In Java, a unit is a class or interface, or a set of
them, e.g.,
 An interface and 3 classes that implement it, or

 A public class along with its helper classes.

 Unit testing is testing of a unit.

2
Why Unit Testing?
 Code isn’t right if it’s not tested.
 Practical
 Most programmers rely on testing, e.g.,
Microsoft has 1 tester per developer.
 You could get work as a tester.
 Divide-and-conquer approach
 Split system into units.
 Debug unit individually.
 Narrow down places where bugs can be.
 Don’t want to chase down bugs in other units.

3
Why Unit Testing? (Cont.)
 Support regression testing
 So can make changes to lots of code and
know if you broke something.
 Can make big changes with confidence.

You might also like