Copyright © 1998 Sita Ramakrishnan, Monash University All rights reserved

Light Views

HomeCase StudiesOO TheoryHelp

Introduction

Testing of an application is undertaken to ensure that software functions correctly and consistently. The testing procedure includes the development of test cases, each of which is intended to test a particular element of the application. The test results are analysed to check the correctness of the software. The test suite for a class will consist of test cases chosen to satisfy specific testing requirements.

The testing phase in software development involves unit testing and integration testing. Unit testing involves testing individual classes or hierarchies of classes, and is typically performed by the software developer. The tester checks the outcome of each test case in the suite by executing a feature (method) and comparing the actual results with the expected results. Unit testing is used to check the correctness of the algorithms implemented in the class and conformance of return values to expected results. The "unit" can be either a class hierarchy, a class, or a method. Conversely, integration testing deals with how well the single units work together. In object-oriented systems, although we test the individual features (methods) within a class, we are more interested in class testing, which combines some aspects of unit testing and integration testing.

Test teams use various UML (Unified Modeling Language) diagrams to aid the testing process. Unit tests use class diagrams and state diagrams; integration tests use collaboration diagrams, state diagrams and component diagrams; and the system tests implement use case diagrams to validate that the system behaves according to the definitions in these diagrams.


Funded by Committee of University Teaching And Staff Development (CUTSD) through DEETYA, 1998