Code coverage criteria are widely used in object-oriented (OO) domains as test quality indicators. However, these criteria are based on the procedural point of view, and therefore do not address the specific features ...
详细信息
Code coverage criteria are widely used in object-oriented (OO) domains as test quality indicators. However, these criteria are based on the procedural point of view, and therefore do not address the specific features of OO programs. In this article, we extend the code coverage criteria and introduce a new set of criterion, called "object coverage criteria," which cope with OO features like object instantiation, inheritance, polymorphism, and dynamic binding. Unlike previous criteria, the new criteria regard the actual type of the object under test and some inherited codes from the parent/ancestor classes that represent the object's states and behaviors. The new criteria have been implemented in a prototype tool called OCov4J for the Java language. Using this tool and conducting an empirical study on 270 classes (with about 50 k lines of code without blank lines and comments) from several large and widely used open source projects, we have found a considerable positive correlation between the object coverage level (defined via the new proposed criteria) and the number of detected specific OO failures. Not only do the proposed criteria provide ease of use, high automation, and low execution cost, but also they can effectively be applied to real-world OO programs.
Software testing is considered to be a very important phase in the development of any software. It becomes crucial to inculcate appropriate software testing techniques in every software development life cycle. object-...
详细信息
ISBN:
(纸本)9789811088483;9789811088476
Software testing is considered to be a very important phase in the development of any software. It becomes crucial to inculcate appropriate software testing techniques in every software development life cycle. object-oriented software development has been in use for a while now. Aspect-oriented approach which is comparatively new and works on the basics of object-oriented approach. But aspect-oriented approach also aims to provide modularity, higher cohesion, and separation of concerns. In this paper, we have reviewed the various testing techniques that are developed for both object-oriented and aspect-oriented systems.
Test case prioritization is a process to order the test cases in such a way that maximum faults are detected as earlier as possible. It is very expensive to execute the unordered test cases. In the present work, a mul...
详细信息
ISBN:
(纸本)9789811088483;9789811088476
Test case prioritization is a process to order the test cases in such a way that maximum faults are detected as earlier as possible. It is very expensive to execute the unordered test cases. In the present work, a multi-factored cost-and code coverage-based test case prioritization technique is presented that prioritizes the test cases based on the percentage coverage of considered factors and code covered by the test cases. For validation and analysis, the proposed approach has been applied on three object-oriented programs and efficiency of the prioritized suite is analyzed by comparing the APFD of the prioritized and non-prioritized test cases.
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 classe...
详细信息
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 analyses 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. Copyright (c) 2010 John Wiley & Sons, Ltd.
Software testing is a process of executing software with the goal of finding errors. It is an important phase in the software development process. It still remains an art due to limitations in understanding of the pri...
详细信息
Software testing is a process of executing software with the goal of finding errors. It is an important phase in the software development process. It still remains an art due to limitations in understanding of the principles of software. In this paper, we present a new approach to testingobject-oriented software using aspect-oriented programming. We propose an aspect-based testing technique that facilitates observing internal details of execution at unit, integration and system levels, during testing of objectoriented software. Our technique adapts logging aspect, to suit the testing needs of object-oriented software. The logging aspect is introduced externally to the software under test, for observing the system's internal and external behavior. The internal execution details are stored in a log file for use during post-analysis. Test coverage reports are generated from the information gathered from the log file. It includes coverage at method, class, inheritance and dynamic binding levels.
The application of object-oriented testing methods for observatory control system is discussed in this paper. Based on introducing the development process of OCS, the OCS testing process is presented. The OCS testing ...
详细信息
The application of object-oriented testing methods for observatory control system is discussed in this paper. Based on introducing the development process of OCS, the OCS testing process is presented. The OCS testing methods and contents, including the development model-testing, components testing, architecture testing and the interfacing for subsystem testing are discussed.
High-coverage testing is challenging. Modern object-oriented programs present additional challenges for testing. One key difficulty is the generation of proper method sequences to construct desired objects as method p...
详细信息
ISBN:
(纸本)9781450309400
High-coverage testing is challenging. Modern object-oriented programs present additional challenges for testing. One key difficulty is the generation of proper method sequences to construct desired objects as method parameters. In this paper, we cast the problem as an instance of program synthesis that automatically generates candidate programs to satisfy a user-specified intent. In our setting, candidate programs are method sequences, and desired object states specify an intent. Automatic generation of desired method sequences is difficult due to its large search space sequences often involve methods from multiple classes and require specific primitive values. This paper introduces a novel approach, called Seeker, to intelligently navigate the large search space. Seeker synergistically combines static and dynamic analyses: (1) dynamic analysis generates method sequences to cover branches;(2) static analysis uses dynamic analysis information for not-covered branches to generate candidate sequences;and (3) dynamic analysis explores and eliminates statically generated sequences. For evaluation, we have implemented Seeker and demonstrate its effectiveness on four subject applications totalling 28K LOC. We show that Seeker achieves higher branch coverage and def-use coverage than existing state-of-the-art approaches. We also show that Seeker detects 34 new defects missed by existing tools.
The widespread use of the object-oriented programs (OOPs) makes the requirement for testsgeneration strategies for testing the OOPs increases from day to day. In this paper, we present a multi-stage genetic algorithm ...
详细信息
The widespread use of the object-oriented programs (OOPs) makes the requirement for testsgeneration strategies for testing the OOPs increases from day to day. In this paper, we present a multi-stage genetic algorithm (MSGA) to generate a suite of tests for testing the OOPs. MSGA includes two optimization stages. The first stage concentrates on finding test cases (sequences of called methods), which satisfy a given test criterion. The second stage focuses on generating test data (values of the arguments of the called methods). In addition, we introduce a new chromosome representation, which consists of two concatenated one-dimensional arrays. Each array contains set of homogeneous genes. In addition, we introduce set of strategies for encoding and decoding the tests. Furthermore, we present set of new genetic operators and the required pre-and post-conditions for applying these operators. In order to determine the applicability and practicability of MSGA, we introduce a new testing tool by implementing MSGA. Also, we conduct a case study by the new tool to assess the efficiency of MSGA in data-flow testing of OOPs.
An objective of unit testing is to achieve high structural coverage of the code under test. Achieving high structural coverage of object-oriented code requires desirable method-call sequences that create and mutate ob...
详细信息
ISBN:
(纸本)9781605580012
An objective of unit testing is to achieve high structural coverage of the code under test. Achieving high structural coverage of object-oriented code requires desirable method-call sequences that create and mutate objects. These sequences help generate target object states such as argument or receiver object states (in short as target states) of a method under test. Automatic generation of sequences for achieving target states is often challenging due to a large search space of possible sequences. On the other hand, code bases using object types (such as receiver or argument object types) include sequences that can be used to assist automatic test-generation approaches in achieving target states. In this paper, we propose a novel approach, called MSeqGen, that mines code bases and extracts sequences related to receiver or argument object types of a method under test. Our approach uses these extracted sequences to enhance two state-of-the-art test-generation approaches: random testing and dynamic symbolic execution. We conduct two evaluations to show the effectiveness of our approach. Using sequences extracted by our approach, we show that a random testing approach achieves 8.7% (with a maximum of 20.0% for one namespace) higher branch coverage and a dynamic-symbolic-execution-based approach achieves 17.4% (with a maximum of 22.5% for one namespace) higher branch coverage than without using our approach. Such an improvement Is significant as the branches that are not covered by these state-of-the-art approaches are generally quite difficult to cover.
testingobject-oriented programs is still a hard task, despite many studies on criteria to better cover the test space. Test criteria establish requirements one want to achieve in testing programs to help in finding s...
详细信息
ISBN:
(纸本)9781595937537
testingobject-oriented programs is still a hard task, despite many studies on criteria to better cover the test space. Test criteria establish requirements one want to achieve in testing programs to help in finding software defects. On the other hand, program verification guarantees that a program preserves its specification but it is not very straightforwardly applicable in many cases. Both program testing and verification axe expensive tasks and could be used to complement each other. This paper presents a study on using formal verification to reduce the space of program testing. As properties are checked using program model checkers, programs are traced. Information from these traces can be used to realize how much testing criteria have been satisfied, reducing the further program test space. The present work is a study on how much the test space of concurrent Java programs can be reduced if DeadlockFreedom is checked prior to testing.
暂无评论