Ask Question. Welcome back. Continue with Google Continue with email. Object oriented testing methods. Please log in to add an answer. Engineering in your pocket Now study on-the-go. Get Started. The team often uses system tests as regression tests when assembling new releases.
The different types of test cases that can be designed for testing object-oriented programs are called grey box test cases. Testing starts from the individual classes to the small modules comprising of classes, gradually to larger modules, and finally all the major subsystems. A good quality software does exactly what it is supposed to do and is interpreted in terms of satisfaction of the requirement specification laid down by the user.
Software quality assurance is a methodology that determines the extent to which a software product is fit for use. Metrics can be broadly classified into three categories: project metrics, product metrics, and process metrics. Project Metrics enable a software project manager to assess the status and performance of an ongoing project. Product metrics measure the characteristics of the software product that has been developed. If all the methods of a class are assumed to be equally complex, then a class with more methods is more complex and thus more susceptible to errors.
Conventional testing methods cannot be applied for testing classes because of problems involved in testing classes, abstract classes, inheritance, dynamic binding, message, passing, polymorphism, concurrency, etc.
Testing classes is a fundamentally different problem than testing functions. A function or a procedure has a clearly defined input-output behavior, while a class does not have an input-output behavior specification.
We can test a method of a class using approaches for testing functions, but we cannot test the class using these approaches. According to Davis the dependencies occurring in conventional systems are: Data dependencies between variables Calling dependencies between modules Functional dependencies between a module and the variable it computes Definitional dependencies between a variable and its types.
But in Object-Oriented systems there are following additional dependencies: Class to class dependencies Class to method dependencies Class to message dependencies Class to variable dependencies Method to variable dependencies Method to message dependencies Method to method dependencies Issues in Testing Classes: Additional testing techniques are, therefore, required to test these dependencies. Another issue of interest is that it is not possible to test the class dynamically, only its instances i.
The use of scenarios in testing is a common way of describing how a user might accomplish a task or achieve a goal within a specific context or environment. Note that these scenarios are more context- and user specific instead of being product-specific. Generally, the structure of a scenario includes the following points.
Scenario- based testing combines all the classes that support a use-case scenarios are subset of use-cases and executes a test case to test them. Execution of all the test cases ensures that all methods in all the classes are executed at least once during testing. However, testing all the objects present in the classes combined together collectively is difficult.
Thus, rather than testing all objects collectively, they are tested using either top-down or bottom-up integration approach. This testing is considered to be the most effective method as scenarios can be organized in such a manner that the most likely scenarios are tested first with unusual or exceptional scenarios considered later in the testing process.
This satisfies a fundamental principle of testing that most testing effort should be devoted to those paths of the system that are mostly used. Traditional testing methods are not directly applicable to OO programs as they involve OO concepts including encapsulation, inheritance, and polymorphism.
These concepts lead to issues, which are yet to be resolved. Some of these issues are listed below. Dinesh Thakur is a Freelance Writer who helps different clients from all over the globe. For any type of query or something that you think is missing, please feel free to Contact us. Why should you use object-oriented programming. About Dinesh Thakur.
0コメント