Skip to main content
Top

1999 | Book

Testing Object-Oriented Software

Life Cycle Solutions

Authors: Imran Bashir, Amrit L. Goel

Publisher: Springer New York

insite
SEARCH

About this book

The rise of object-oriented (00) software development seems to have helped improve software quality, but it has not, of course, eliminated all possibility of error. Thus, software testing is at least as important today as it ever has been. Testing, as a centerpiece of quality assurance efforts, only increases in value as society becomes more and more reliant on software. Testing 00 components and even 00 systems is not very difficult once you know how to do it. But until now there have been few accounts of how to do it well and none that adequately characterize testing across the life cycle of large 00 software production efforts. This book combines insights from research on 00 testing with insights from industrial testing efforts to produce an account that should be valuable to anyone interested in the theory and practice of testing 00 software. This book provides extensive coverage of testing methods applicable to 00 software development, as well as discussions of underlying concepts and technical underpinnings that enable you to devise additional techniques of your own. It is unlikely that you will apply every test, process, review criterion, or metric described in this book to your software project. If you have a small project, it is unlikely that you will apply more than a few of them. But the breadth of coverage allows you to select and customize them with full knowledge of the alternatives and of the options available if you need to extend testing efforts.

Table of Contents

Frontmatter
1. Introduction
Abstract
There has been a phenomenal growth in the utilization of object-oriented technology for developing software systems during this decade. Object-oriented methods have proliferated in software applications for such diverse fields as artificial intelligence, graphics, exploratory programming, physics, telecommunication, banking, stock market, manufacturing, and the internet. As a matter of fact, it is hard these days to name a field that does not utilize the benefits of this technology. Most of the internet applications and applets have been devised using object-oriented design techniques. In fact, object-oriented technology is everywhere and is the single most common factor in software applications being developed at the turn of the millennium.
Imran Bashir, Amrit L. Goel
2. Software Process and Testing Models
Abstract
Software development is, both physically and mentally, an exhausting process. Schedule pressures, lack of resources, inadequate tools, unanticipated server and network down times, and so on are some of the very familiar scenarios. Through all these bumps and jolts emerges a victorious team with a software system that, for the most part, works.
Imran Bashir, Amrit L. Goel
3. Impact of Object Orientation on Testing
Abstract
Most current software testing techniques are congruent with functionalbased software. A unit of software is either tested against its specifications or against some code-coverage criterion to execute its identified paths. Object-oriented software is radically different from its procedural counterpart[Amb96]. Procedural programming relies on procedural autonomy with no interaction through nonlocal variables. Object-oriented programming, in contrast, discourages procedure autonomy and relies on the packaging of procedures that share an object’s local variables[CS93]. The roots of object-oriented programming style lie in the encapsulation and abstraction of abstract data types[Cop92]. Object-oriented technique provides an abstract way of thinking about a problem in terms of problemdomain concepts, rather than in computer concepts [RBP+91]. These concepts are eventually converted into computer concepts, but the abstract way of object-oriented thinking provides a completely different implementation compared with the functional, design-based implementation. Object-oriented languages provide many new constructs that aid in the implementation of an object-oriented design. Since these concepts are not prevalent in traditional software, existing software testing techniques fail to suffice for completely testing object oriented software[CMLK96a].
Imran Bashir, Amrit L. Goel
4. Requirements Testing
Abstract
Requirements testing has been one of the most neglected areas in the software testing world. Until recent years, the results of requirements collections and requirements analysis were not tested at all. With the advent of modern software engineering techniques, testing these results has become more acceptable, though not widely practiced. Requirements testing is still an ad hoc and informal process. Lack of attention to requirements testing is evident from the scarcity of requirements testing tools.
Imran Bashir, Amrit L. Goel
5. Design Testing
Abstract
Testing the validity of designs in not a novel concept; it is as old as design itself. Whenever we design something, we test it, at least mentally, to ensure that the design will meet its expectations.
Imran Bashir, Amrit L. Goel
6. Base Classes Unit Testing
Abstract
The most significant impact on the testing of object-oriented software is the shift in focus to unit and integration testing strategies[Ove93a]. A class is the basic building block for constructing object-oriented software[PBC93]. Hence, it is the most natural unit of testing. The notion of a class as a unit of testing has been supported by many object-oriented project experience reports [MT W94]. Class-level testing requires substantial effort in the engineering of highly robust and reliable object-oriented systems. Testing of a class in an object-oriented system is not trivial, however. Most of the publicized features of object-oriented software have insidious effects on the application of conventional software testing approaches to unit testing.
Imran Bashir, Amrit L. Goel
7. Derived Classes Unit Testing
Abstract
Inheritance is one of the bases of object-oriented programming. Inheritance is a hierarchical relationship that allows us to exploit the commonality between various classes. Since classes represent concepts, and concepts do not exist in isolation, it can be implied that there is a logical relationship between various classes[Str91]. Inheritance is one of many possible glues that logically bind two classes. Inheritance provides a simple, flexible, and efficient mechanism for defining a new class by adding or modifying the facilities provided by an existing class. When two classes are related by inheritance, a class is derived from another class, which is then called a base class. The derived class inherits the properties, including data members and member functions, of its base class[ES90].
Imran Bashir, Amrit L. Goel
8. Testing C++ Special Features
Abstract
C++ is a puissant language. The potency of C++ comes from its vast set of features and its flexibility. For example, it lets a programmer build a new class via the composition of existing or user-defined classes. Some of its other features include various levels of visibility for the attributes of a class, static data members, function pointers, nested classes, generic classes, templates, and so on. This chapter addresses the application of our unit testing approach to such concrete features. Readers who do not use C++ for their object-oriented projects can skip this chapter without any break in continuity.
Imran Bashir, Amrit L. Goel
9. Code Reviews
Abstract
There are two primary means of testing any software, computer-based testing and human-based testing.Computer-based software testing requires automated tools to generate the test cases and subsequently to execute them. Human-based software testing, on the other hand, involves the visual inspection of a software fragment by a team of qualified individuals. While computer-based testing has its merits, human-based testing of software has also been found to detect errors effectively. These techniques are complementary, and both should be used for improving the quality of any software. The prevalence of certain types of errors[Bas93] in object-oriented software also warrants the use of human-based software testing due to the lack of good computer tools to detect these types of errors.
Imran Bashir, Amrit L. Goel
10. Integration Testing
Abstract
Application of traditional software testing techniques to object-oriented software is not seamless. Object-oriented languages create many opportunities for errors. The situation is further complicated by the naive application of theoretical constructs and techniques of traditional software development and testing to object-oriented languages. It is incumbent on the software testing community to discover additional levels of integration testing for object-oriented software.
Imran Bashir, Amrit L. Goel
11. Integrated-System Testing
Abstract
Integrated-System Testing1 is an immense and squirrelly task, and it engrosses a major phase of the software development life cycle. Traditionally, all testing activities of a system are intensely sustained during this phase. A significant amount of effort has been invested in the literature[Inc97][Mus96] on the issues related to the system testing. With the advent of parallel testing life cycle [Bas99],2 the unswerving activities of this phase have been distributed throughout the software development life cycle, especially in the object-oriented software development model. In addition to identifying errors at earlier stages, the distribution of testing also reduces the marathon effort required in a single stage.
Imran Bashir, Amrit L. Goel
Backmatter
Metadata
Title
Testing Object-Oriented Software
Authors
Imran Bashir
Amrit L. Goel
Copyright Year
1999
Publisher
Springer New York
Electronic ISBN
978-1-4612-1526-4
Print ISBN
978-1-4612-7179-6
DOI
https://doi.org/10.1007/978-1-4612-1526-4