01-03-2013, 11:42 AM
Software Testing
Software.docx (Size: 22.89 KB / Downloads: 27)
Outline
• Overview of software testing.
• Unit testing.
• JUnit tutorial.
• Software test specification.
Background
Testing is the process of executing a program with the intent of finding errors. A good test case is one with a high probability of finding an as-yet undiscovered error. A successful test is one that discovers an as-yet-undiscovered error.
The causes of the software defects are: specification may be wrong; specification may be a physical impossibility; faulty program design; or the program may be incorrect.
Basic Definitions
• A failure is an unacceptable behavior exhibited by a system.
• A defect is a flaw in any aspect of the system that contributes, or may potentially contribute, to the occurrence of one or more failures. It might take several defects to cause a particular failure.
• An error is a slip-up or inappropriate decision by a software developer that leads to the introduction of a defect.
Good Test Attributes
A good test has a high probability of finding an error, not redundant, and should not be too simple or too complex.
Unit Testing
Unit testing is testing each unit separately. In unit testing interfaces tested for proper information flow and local data are examined to ensure that integrity is maintained. Boundary conditions and all error handling paths should also be tested.
CASE Tools
JUnit is an open-source project to provide a better solution for unit testing in Java. It can be integrated with many Java IDEs.
Central idea: create a separate Java testing class for each class you’re creating, and then provide a means to easily integrate the testing class with the tested class for unit testing.