138,623 research outputs found

    A Testing Strategy for Abstract Classes [Draft]

    Get PDF
    One of the characteristics of the increasingly widespread use of object-oriented libraries and the resulting intensive use of inheritance is the proliferation of dependencies on abstract classes. Since abstract classes cannot be instantiated, they cannot be tested in isolation using standard execution-based testing strategies. A standard approach to testing abstract classes is to instantiate a concrete descendant class and test the features that are inherited. This paper presents a structured approach that supports the testing of features in abstract classes, paying particular attention to ensuring that the features tested are those defined in the abstract class. Two empirical studies are performed on a suite of large Java programs and the results presented. The first study analyzes the role of abstract classes from a testing perspective. The second study investigates the impact of the testing strategy on the programs in this suite to demonstrate its feasibility and to comment on the pragmatics of its use

    State-based testing - a new method for testing object-oriented programs

    Get PDF
    State-based testing is a new method for testing object-oriented programs. The information stored in the state of an object is of two kinds: control-information and data-storage. The control-information transitions are modelled as a finite state automaton. Every operation of the class under test is considered as a mapping from starting states to a finishing states dependent upon the parameters passed. The possible parameter values are analysed for significant values which combined with the invocation of an operation can be used to represent stimuli applied to an object under test. State-based testing validates the expected transformations that can occur within a class. Classes are modelled using physical values assigned to the attributes of the class. The range of physical values is reduced by the use of a technique based on equivalence partitioning. This approach has a number of advantages over the conceptual modelling of a class, in particular the ease of manipulation of physical values and the independence of each operation from the other operations provided by an object. The technique when used in conjunction with other techniques provides an adequate level of validation for object-oriented programs. A suite of prototype tools that automate the generation of state-based test cases are outlined. These tools are used in four case studies that are presented as an evaluation of the technique. The code coverage achieved with each case study is analysed for the factors that affect the effectiveness of the state-based test suite. Additionally, errors have been seeded into 2 of the classes to determine the effectiveness of the technique for detecting errors on paths that are executed by the test suite. 92.5% of the errors seeded were detected by the state-based test-suite

    Object Oriented Implementation of the Parallel Toolkit Library

    Get PDF
    With manufacturing efficiencies and technological innovation the computing power of commodity machines has been increasing accompanied by decreasing costs. With the very favorable price/performance ratio the computing community has shifted from monolithic machines to networked machines. This has created the need for software to manage the parallelism of the network. One such work has been the Parallel Toolkit Library. The Parallel Toolkit Library provides support for common design functionalities used throughout parallel programs. This work extends the PTK C library for C++ parallel programs. The motivation for the current project stems from the need to let parallel programs reap the benefits of a library with an object oriented programming approach. This also fits well with the introduction of C++ bindings in MPI. The library has been structured on object-oriented concepts. The functionality of the PTK-C has been encapsulated into various classes. Individual functionalities have also been split into multiple classes leading to modularity and reusability of code. Template programming has been used to ensure type safety. The testing results are consistent with expectations in that the PTK-C++ is very much comparable to the PTK-C in terms of performance. In most cases, it would be more efficient to use the toolkit than to rewrite the code to recreate the efficiencies already present in the library

    A Machine With Class: A Framework for Object Generation, Integration and Language Authentication (FROGILA)

    Get PDF
    The object technology model is constantly evolving to address the software crisis problem. This novel idea which informed and currently guides the design style of most modern scalable software systems has caused a strong belief that the object-oriented technology is the ultimate answer to the software crisis, i.e. applying an object-oriented development method will eventually lead to quality code. It is important to emphasise that object-orientedness does not make testing obsolete. As a matter of fact, some aspects of its very nature introduce new problems into the production of correct programs and their testing due to paradigmatic features like encapsulation, inheritance, polymorphism and dynamic binding as this research work shows. Most work in testing research has centred on procedure-oriented software with worthwhile methods of testing having been developed as a result. However, those cannot be applied directly to object-oriented software owing to the fact that the architectures of such systems differ on many key issues. In this thesis, we investigate and review the problems introduced by the features of the object technology model and then proceed to show why traditional structured software testing techniques are insufficient for testing object-oriented software by comparing the fundamental differences in their architecture. Also, by reviewing Weyuker’s test adequacy axioms we show that program-based testing and specification-based testing are orthogonal and complementary. Thus, a software testing methodology that is solely based on one of these approaches (i.e. program-based or specification-based testing) cannot adequately cover all the essential paths of the system under test or satisfactorily guarantee correctness in practice. We argue that a new method is required which integrates the benefits of the two approaches and further builds upon their individual strengths to create a more meaningful, practical and reliable solution. To this end, this thesis introduces and discusses a new automaton-based framework formalism for object-oriented classes called the Class-Machine and a test method that is based on this formalism. Here, the notion of a class or the idea behind classification in object-oriented languages is embodied within a machine framework. The Class-Machine model represents a polymorphic abstraction for heterogeneous families of Object-Machines that model a real life problem in a given domain; these Object-Machines are instances of different concrete machine types. The Class-Machine has an extensible machine implementation as well as an extensible machine interface. Thus, the Class-Machine is introduced as a formal framework for generating autonomous Object-Machines (i.e. Object-Machine Generator) that share common Generic Class-Machine States and Specific Object-Machine States. The states of these Object-Machines are manipulated by a set of processing functions (i.e. Class-Machine Methods and Object-Machine Methods) that must satisfy a set of preconditions before they are allowed to modify the state(s) of the Object-Machines. The Class-Machine model can also be viewed as a platform for integrating a society of communicating Object-Machines. To verify and completely test systems that adhere to the Class-Machine framework, a novel testing method is proposed i.e. the fault-finders (f²) - a distributed family of software checkers specifically designed to crawl through a Class-Machine implementation to look for a particular type of fault and tell us the location of the fault in the program (i.e. the class under test). Given this information, we can statistically show the distribution of faults in an object-oriented system and then provide a probabilistic assertion of the number and type of faults that remain undetected after testing is completed. To address the problems caused through the encapsulation mechanism, this thesis introduces and discusses another novel framework formalism that has complete visibility on all the encapsulated methods, memory states of the instance and class variables of a given Object-Machine or Class-Machine system under test. We call this the Class Machine Friend Function (CMƒƒ). In order to further illustrate all the fundamental theoretical ideas and paradigmatic features inherent within our proposed Class-Machine model, this thesis considers four different Class-Machine case studies. Finally, to further show that the Class-Machine theoretical purity does not mitigate against practical concerns, our novel object-oriented specification, verification, debugging and testing approaches proposed in this thesis are exemplified in an automated testing tool called: The Class-Machine Testing Tool (CMTT)

    A similarity metric for the inputs of OO programs and its application in adaptive random testing

    Get PDF
    Random testing (RT) has been identified as one of the most popular testing techniques, due to its simplicity and ease of automation. Adaptive random testing (ART) has been proposed as an enhancement to RT, improving its fault-detection effectiveness by evenly spreading random test inputs across the input domain. To achieve the even spreading, ART makes use of distance measurements between consecutive inputs. However, due to the nature of object-oriented software (OOS), its distance measurement can be particularly challenging: Each input may involve multiple classes, and interaction of objects through method invocations. Two previous studies have reported on how to test OOS at a single-class level using ART. In this study, we propose a new similarity metric to enable multiclass level testing using ART. When generating test inputs (for multiple classes, a series of objects, and a sequence of method invocations), we use the similarity metric to calculate the distance between two series of objects, and between two sequences of method invocations. We integrate this metric with ART and apply it to a set of open-source OO programs, with the empirical results showing that our approach outperforms other RT and ART approaches in OOS testing

    Designing a reusable class cluster: a hypertext cluster

    Get PDF
    This thesis is a contribution to the study of object-oriented software engineering, focusing upon the reuse-approach to build reliable and extendable software. A hypertext system has been developed to study the reuse. The ET++ and MacApp framework class libraries provide standard components that can be re-used to develop application-specific programs. A plug-compatible design is presented in this work; this design approach facilitates building applications that work with frameworks based on similar principles running on different platforms. Hypertext is chosen as an example domain for designing class clusters, while ET++ and MacApp are selected as frameworks. A survey of reuse and hypertext is done at various levels. The hypertext specific classes are designed, keeping the commonalities in mind to provide adequate generalization. These classes are implemented on the ET++ and MacApp frameworks. There are variations in the two implementations, but overall design of the classes remains the same. The design is validated by testing it against the changing requirements of the system and adding new functionality to the system. The effectiveness of the plug-compatible approach is explored

    Testing coupling relationships in object-oriented programs

    Get PDF
    As we move toward developing object‐oriented (OO) programs, the complexity traditionally found in functions and procedures is moving to the connections among components. Different faults occur when components are integrated to form higher‐level structures that aggregate the behavior and state. Consequently, we need to place more effort on testing the connections among components. Although OO technologies provide abstraction mechanisms for building components that can then be integrated to form applications, it also adds new compositional relations that can contain faults. This paper describes techniques for analyzing and testing the polymorphic relationships that occur in OO software. The techniques adapt traditional data flow coverage criteria to consider definitions and uses among state variables of classes, particularly in the presence of inheritance, dynamic binding, and polymorphic overriding of state variables and methods. The application of these techniques can result in an increased ability to find faults and to create an overall higher quality software

    Testing Object-Oriented Programs: Making it Simple

    Get PDF
    One of the major difficulties facing anyone trying to teach the first programming course is how to encourage students to thoroughly test their programs. We would argue that the main reasons for this are the lack of suitable tools for testing and the need to write extra "debug" code in order to verify correct operation. We further argue that the problem is even worse with object-oriented languages because of multiple classes and encapsulation. In this paper we describe the testing tools within the Blue programming environment which allow object-oriented programs to be thoroughly tested without writing a single line of new code
    corecore