Design And Code Time Testability Analysis For Object Oriented Systems

Abstract - In last few decades object oriented software design approach is widely chosen by programmers to design any large and complex system. As the complexity of object oriented software increases, design for testability becomes a necessary task for these systems. The performance of testability is also directly affected by software design for testability. Therefore to make the task of testability more effective, smooth, and reliable, we need the concept of design for testability. Design for testability can be applied during the design time as well as code time but both have its own concerns. This paper discusses design for testability analysis to enhance the testability of object oriented systems.

Index Terms ' Code Time Testability, Design for Testability, Design Time Testability, Object Oriented Systems, Testability

NOMENCLATURE
DFT- Design for Testability
IEEE- Institute of Electrical and Electronics Engineers
UML- Unified Modeling Language

I. INTRODUCTION
This paper provides practical ideas that will influence the testability of object oriented systems with the help of design for testability (DFT) analysis. Developing reliable software is the foremost demand of every developer. As the complexity and criticality of the object oriented software increases, the performance of testing becomes a major concern for these systems. Conventional methods of testing like black box testing, white box testing may increase the testing time and can decrease the testing efficiency. Thus, to minimize testing resources, time and cost there is a wide concern of software testability. Testability greatly improves testing efficiency, reliability and software quality of object oriented systems. Testability determines the bound to which the risk of costly or critical bugs can be reduced to an acceptable level. The IEEE Standard Glossary defines testability as 'the degree to which a system or component facilitates the establishment of test criteria and performance of tests to determine whether those criteria have been met' [1]. Designing a software system with testing into consideration is called design for testability. In other words DFT is an approach which aligns the development process in order to make the testing more effective. Now a day's software growth has become more and more complex, vast and replacing human interaction increasingly. Software testing consumes a large amount of time, cost and effort in
1Student, JIIT, NOIDA, INDIA
2Assistant Professor (Senior Grade), JIIT, NOIDA, INDIA
E-mail: 1megha21.joshi@gmail.com and 2neetu.sardana@jiit.ac.in
software life cycle. Most of the time, resources to develop a software are limited. Testability is a process that achieves greater reliability in such a resource-constrained development environment. It improves the quality of the software. Testability leans to form the validation phase more adequate in exposing faults throughout the testing process and consequently increasing the quality of end-product to meet appropriate specifications. Testability analysis was based on input and output domains of a software component. Testability was also described in terms to uncover faults in a program [2]. Testability can also be considered from the architectural view point i.e. controllability and observability. Earlier testability was estimated on the basis of controllability and observability. Controllability indicates the ease of generating all values of its specified output domain. Observability captures the degree to which a component can be observed to generate the correct output for a given input [3]. Test effort is indirectly proportional to testability i.e. if testability is not perfectly evaluated then it increases the testing cost and effort. In order to make the task of testability more impressive and profitable, DFT can be applied in all phases of software development cycle. Seeing the importance of DFT, the paper elaborates the design for testability during both design and code phases of software development cycle and its related factors.
The rest of the paper is summarized as follows: Section II describes the design time DFT and code time DFT. Section III presents the affecting factors of DFT. Section IV discusses the improving methods of DFT during designing and coding phase of software construction cycle. Last section concludes & proposes its future scope.

II. DESIGN FOR TESTABILITY
Object-oriented language has become the leading approach for software development because it provides a powerful software design mechanism by using information hiding, inheritance and abstraction. Inheritance and information hiding help in software designing, but results a negative effect on testing and testability. Researches have shown that multiple inheritance and abstraction can actually decrease the testability of software, written in an object-oriented language [4]. Classical views on testing and testability are not suited to object oriented systems. For example it can be very difficult to apply testability on the methods that encompass multiple units of code and define many inherent dependencies and interactions between the classes. In these systems if code fails, it tends to be more difficult to track down the sources of the failure. While considering DFT during the design of a system, such problems can be avoided. Applying testability without taking consideration of any preferable design pattern will be errant, tedious and expensive idea. That is why the concept of design for testability is increasingly used in testability. DFT is applied both in design and code time in such a way that it will take less effort to apply testability in all phases of development cycle and in whole scenario of these systems. DFT depends upon certain testability characteristics like controllability, observability, isolateability. DFT defines as 'a planning to coordinate the development process in such a way that the task of testing is maximally effective' [5]. DFT does not measure the testability of object oriented software directly but it transforms the system in such a way that the task of testability for a system becomes more efficient and effective. To develop a DFT analysis, it is good to know the software type, objectives of the software, programming platform, designing and coding strategies. It is very important and valuable to develop better DFT analysis to promote the software testability.
Based on the DFT, software Testability can be divided into two major categories:
A- Design Time DFT
B- Code Time DFT

A. Design Time DFT
Design time DFT is integrated at analysis and design phase of software development cycle. Testability provides a direction and guidance for testing, which is better than blind testing. Testability enforces good design principles. In object oriented systems during the analysis and design stages, testability analysis may yield the maximum outcome. During the designing phase of software, it can be shown in terms of architectural and detailed design diagrams. These representations capture the structure and behavior of the software before it is implemented. The representations are then transformed into the actual software implementation. The impact of specific types of class interactions on the testability of UML class diagrams was also discussed in [6]. By providing immediate feedback to designers it can be the possibility that designs will be improved at their initial stage before entering into the implementation phase, to enhance the software testability. After entering into the implementation phase, changing the system design using refactoring methods will be extremely expensive and error prone. The prior the design time testability is evaluated, the better the software architecture will be formulated. The aim of design time DFT is to make the design of software in such a way that the estimation of testability in further phases becomes less time consuming and more reliable. A study in software testability has given the information that there is an interrelationship between common object oriented design techniques including inheritance, information hiding and low testability [4]. Different design styles play an important role in design time DFT. Some is better for software as well as for estimation of DFT, while the others are better for software but impacts negative on the design time DFT. Such as, dependencies are required for functionality but make the effort of testability more problematic. The method of removing dependency cycles from dependency graphs to promote software design time testability was formulated in [7]. Testability analysis can also be measured during design time. Designers get inputs from these design time testability analysis and improve the existing design of software at the design phase itself. A testability measurement for UML class diagrams was discussed in [8]. If testability analysis with the help of data flow diagrams may be applied at the starting of design phase, more effective testing resources formulation is possible.

B. Code Time DFT
Code time testability is a key for the integration and estimation of highly dynamic and effective object oriented systems where conventional design time testability will not give effective results. Code time DFT is required at coding phase to make the code more effective for testability analysis. Code time testability is mandatory before running the software because it is necessary to have the prior knowledge to which extent the system can be tested safely while it is operational. Code time DFT is a design technique that enhances the runtime testability analysis of a system before the test cases are executed. Sometimes, after adapting a good design approach testability of the system will not be as efficient as it can be. This happens because of applying erroneous coding mechanisms. Rough or poor coding practices lead the system towards the failure. The testability of these systems is also not appropriate which affects the object oriented system quality and reliability. That is why the code time DFT is introduced at the coding phase of software development cycle. In code time DFT, some secure coding mechanisms are adapted at the time of coding for a system so that the chances of failure of the system can be reduced at the maximum possible extent. By using code time DFT, The performance of testability is also highly raised. As much as the testability of the object oriented systems will increase, the task of testing becomes easier and will make the system more reliable.

III. AFFECTING FACTORS OF DFT
The main constituents of object-oriented systems are classes and interfaces. A class may implement one or more interfaces. There can be a dependency between a class and another class. Inheritance, polymorphism, encapsulation etc are the object oriented design and programming concepts, which make the object oriented systems more efficient. But complex inheritance trees, excessive dependencies, high abstraction can make the design for testability less effective and more time consuming. Implicit inputs give negative effective to the testability of the system. Control structures that are defined within the methods are also not good for DFT analysis. Inaccurate traceability of requirements makes testability less adequate. Excessive use of static methods and fields introduce hard wired dependencies. These static notations also affect DFT and reduce testability.
Factors that affect the DFT of object oriented software at design time as well as at code time are summarized in Table I.

 

Affecting factors
Design Time DFT Code Time DFT
Imprecise Requirements '
Cyclic dependencies ' '
Coupling & Cohesion ' '
Antipatterns '
Exception Handling '
Recursive Implementation '
Traceability ' '
Impenetrable Object network '
Unstructured and Unachievable Code '
Controllability and Observability ' '
Table 1: DFT Affecting Factors

IV. IMPROVING METHODS OF DFT
In order to improve the overall testability of an object oriented system, various methods are used to improve the DFT of software. System should be parameterized according to the test environment. Implication of traceability will be done adequately. To improve DFT recursive implementation of algorithms should be avoided. Unmoved polymorphic methods should be avoided and in case of multiple inheritances, root classes should be considered. Incorporation of software redundancy may be the good idea to design different versions of software to avoid them, obtaining same faults on the same inputs and enhancing testability. In object oriented programming, methods can be declared as final if they are not designed to be overridden. This will help to increase the testability of software. Methods that improve the DFT of object oriented software are discussed in Table II.

Improving Methods
Design Time DFT Code Time DFT
Naming Convention '
UML extension Mechanism '
UML Stereotypes '
Observation Points ' '
Check Points and Wrappers '
Dependency injection '
Effective Programming Language '
Modularity(Modular Structure) ' '
Exception Handling Mechanism '
Hidden and Custom Controls ' '
Table 2: DFT Improving Methods

V. CONCLUSION
The paper has described the importance of testability during design time as well as code time. As evaluation of design for testability in object oriented software development phases (designing and coding) enhances the software quality and reliability as well as reduces the testing effort, overall time, cost of testability and testing. Paper has also identified the key factors that need to be taken care of during both the phases of testability. Testability applied during the design time; give the clarity about the interconnections among the various modules that are part of a system. Moreover, it also helps to improve the implementation of a system and reduces the bugs up to a certain extent. This paper has also highlighted that for few object oriented systems, early design time evaluation of testability cannot be performed effectively. So, there is a demand of code time DFT. Paper has described the various factors that affect the DFT of object oriented software design at design time as well as at code time. It has been observed that it is not necessary that all DFT affecting factors will affect at design or at code time. Some factors can affect only at design or code and some can affect on both. Therefore, improved methods are also proposed based on the nature of affecting factors i.e. whether affecting at design time or at code time.

FUTURE SCOPE
An integrated approach in which design time as well as code time DFT can be applied on the same object oriented software to test its effectiveness with respect to the DFT that is applied only at design time or at code time.

REFERENCES
[1]. IEEE Standard Glossary of Software Engineering Terminology, ANSI/IEEEE Standard 610.12-1990, IEEE Press, New York, 1990.
[2]. J.M. Voas and K. Miller, 'Software Testability: The New Verification', IEEE Software, Vol. 12, No. 13, pp. 17-28, May 1995.
[3]. R. S. Freedman, 'Testability of Software Components', IEEE Transactions on Software Engineering, Vol. 17, No. 6, pp. 553-564, June 1991.
[4]. S. Mouchawrab, L. C. Briand, and Y. Labiche, "A measurement framework for object-oriented software testability", Information and Software Technology, Vol. 47, No. 1, pp. 979-997, 2005.
[5]. R.V. Binder, 'Design for Testability in Object-Oriented Systems', Communications of the ACM, Vol. 37, No. 9, pp. 87-101, September 1994.
[6]. B. Baudry, Y. L. Tran, and G. Sunye, "Measuring design testability of a UML class diagram", Information and Software Technology, Vol. 47, No. 1, pp. 859-879, 2005.
[7]. S. Jungmayr, "Identifying Test-Critical Dependencies", Proc. IEEE International Conference on Software Maintenance, Montreal, pp. 404-413, 2002.
[8]. B. Baudry, Y. L. Tran, and G. Sunye, "Measuring design testability of a UML class diagram", Information and Software Technology, Vol. 47, No. 1, pp. 859-879, 2005.

Source: Essay UK - http://doghouse.net/free-essays/information-technology/code-time-testability-analysis.php


Not what you're looking for?

Search:


About this resource

This Information Technology essay was submitted to us by a student in order to help you with your studies.


Rating:

Rating  
No ratings yet!


Word count:

This page has approximately words.


Share:


Cite:

If you use part of this page in your own work, you need to provide a citation, as follows:

Essay UK, Design And Code Time Testability Analysis For Object Oriented Systems. Available from: <http://doghouse.net/free-essays/information-technology/code-time-testability-analysis.php> [22-02-19].


More information:

If you are the original author of this content and no longer wish to have it published on our website then please click on the link below to request removal:


Essay and dissertation help

badges