Engineering Criteria for Technologies in Software Integration pdf417 in Software Engineering Criteria for Technologies

Engineering Criteria for Technologies using barcode printer for none control to generate, create none image in none applications. iOS the object. The none none collection of methods that can be executed is called the polymorphic call set (PCS). In this example, the PCS for x.

m() is {A::m(), B::m()}.. 7.1.1 Unique Issues with Testing OO Software Several testing none none issues are unique to object-oriented software. Some researchers have claimed that traditional testing techniques are not as effective for object-oriented software and sometimes test the wrong things. Methods tend to be smaller and less complex, so path-based testing techniques may be less useful.

As discussed previously, inheritance, polymorphism, and dynamic binding introduce special problems. The execution path is no longer based on the class s static declared type, but the dynamic type; and that is not known until execution. When testing object-oriented software, a class is usually regarded as the basic unit of testing.

This leads to four levels of testing classes. 1. Intra-method testing: Tests are constructed for individual methods (this is traditional unit testing) 2.

Inter-method testing: Multiple methods within a class are tested in concert (this is traditional module testing) 3. Intra-class testing: Tests are constructed for a single class, usually as sequences of calls to methods within the class 4. Inter-class testing: More than one class is tested at the same time, usually to see how they interact (this is a type of integration testing) Early research in object-oriented testing focused on the inter-method and intraclass levels.

Later research focused on the testing of interactions between single classes and their users and system-level testing of OO software. Problems associated with inheritance, dynamic binding and polymorphism cannot be addressed at the inter-method or intra-class levels. These require multiple classes that are coupled through inheritance and polymorphism, that is, inter-class testing.

Most research in object-oriented testing has focused on one of two problems. One is the ordering in which classes should be integrated and tested. The CITO problem was discussed in 6.

The other is developing techniques and coverage criteria for selecting tests. These coverage criteria are re nements of one or more of the criteria presented in the earlier chapters..

7.1.2 Types of Object-Oriented Faults One of the hard none none est tasks for object-oriented software engineers is visualizing the interactions that can occur in the presence of inheritance, polymorphism, and dynamic binding. They are often very complex! This visualization assumes a class encapsulates state information in a collection of state variables, and has a set of behaviors that are implemented by methods that use those state variables. As an example, consider the UML class diagram and code fragment shown in Figure 7.

1. In the gure, V and X extend W, V overrides method m(), and X overrides methods m() and n(). The minuses ( ) indicate the attributes are private and the pluses ( + ) indicate the attributes are non-private.

The declared type of o is W, but at line 10, the actual type can be either V or W. Since V. Applying Criteria in Practice +m() +n(). W 1. void f (bo olean b) 2. { 3.

W o; 4. ..

. 5. if (b) 6.

o = new V(); 7. else 8. o = new W(); 9.


10. o.m(); 11.

}. +m(). +m() +n(). (a ). Figure 7.1. Example class hierarchy in UML. overrides m(), none for none which version of m() is executed depends on the input ag to the method f(). To illustrate problems from method overriding and polymorphism, consider the simple inheritance hierarchy shown on the left of Figure 7.2.

The root class A contains four state variables and six methods. The state variables are protected, which means they are available to A s descendents (B and C). B declares one state variable and three methods and C declares three methods.

The arrows on the gure show the overriding: B::h() overrides A::h(), B::i() overrides A::i(), C::i() overrides B::i(), C::j() overrides A::j(), and C::l() overrides A::l(). The table on the right of Figure 7.2 shows the state variable de nitions and uses for some of the methods in the hierarchy.

The problem begins with a call to A::d(). This small example has.
Copyright © . All rights reserved.