Professional Documents
Culture Documents
OOSE concepts
OOSE concepts
OO Testing
Initially, we were following the traditional method of testing which consists of procedures
operating on data. But now, we are following the object-oriented testing method that focuses
on the objects that are instances of classes. This change from traditional to object-oriented
made us reconsider old strategies and software testing methods. There are many advantages
of using the OO paradigm including reliability, interoperability, reusability, and extendibility.
Levels of OO testing
1. At the algorithmic level, a single module of every class should be tested. As discussed
earlier, testing of classes is the main concern of the Object Oriented program. Every class
gets tested as an individual entity at the class level. Generally, programmers who are creating
the classes are involved in testing. Test cases for Object-Oriented Testing in Software Testing
can be constructed based on the requirement specifications, programming language, and
models.
2. Cluster-level testing is the integration of individual classes. The main purpose of doing
integration testing is to verify the interconnection between classes and how well they
perform interclass interactions. Thus, Cluster level testing can be viewed as integration
testing of classes.
3. In system testing, integration between clusters can be taken care of. Also, at each level
regression testing is a must after every new release.
OO Testing methods
1. Fault-based testing:
Focuses on identifying all possible faults in consumer specifications or code.
Test cases are designed to flush out defects, including incorrect
specifications and interface errors.
Traditional testing models may rely on functional testing to detect these
errors.
2. Scenario-based testing:
Detects issues arising from wrong specifications and improper class
interactions.
Tests are based on detailed scenarios reflecting end-user tasks in specific
environments.
Combines all classes involved in use cases to ensure thorough testing, often
using top-down or bottom-up integration approaches.
3. Class testing based on method testing:
Each method of a class is tested individually to ensure proper functionality.
A simple and common approach in object-oriented testing.
Method testing involves testing methods once to minimize redundancy and
time consumption.
4. Partition Testing:
Divides inputs and outputs into categories to minimize the number of test
cases.
Aims to cover different partitions of input and output data to ensure
comprehensive testing.
Helps identify potential errors or bugs in different segments of the system.
OO testing strategies
1. Class Testing:
Focuses on testing individual classes to ensure their methods and attributes
function correctly.
Tests are designed to verify the behavior and functionality of each class in
isolation.
2. Integration Testing:
Tests the interactions between classes or modules to ensure they work
together as intended.
Validates the communication and data flow between different parts of the
system.
3. Inheritance Testing:
Focuses on testing the inheritance relationships between classes.
Ensures that subclasses inherit and override methods and attributes correctly
from their parent classes.
4. Polymorphism Testing:
Verifies the behavior of polymorphic methods and their ability to handle
objects of different types.
Tests how objects of different subclasses respond to the same method calls.
5. State-based Testing:
Tests the behavior of objects in different states.
Ensures that objects transition between states correctly and perform the
appropriate actions in each state.
6. Message Passing Testing:
Validates the communication between objects through message passing.
Tests how objects send and receive messages and respond to them
accordingly.
7. Scenario-based Testing:
Tests entire scenarios or use cases to ensure that multiple classes work
together to achieve specific functionalities.
Focuses on testing real-world scenarios to verify the system's behavior from
end to end.
8. Mocking and Stubbing:
Uses mock objects or stubs to simulate the behavior of dependencies during
testing.
Helps isolate classes for testing and ensures that they behave as expected in
different contexts.
9. Regression Testing:
Re-tests previously tested functionalities to ensure that recent changes or
updates have not introduced new defects.
Ensures that modifications do not adversely affect the behavior of existing
classes or modules.
10. Usability Testing:
Evaluates the usability of the software from a user's perspective.
Tests how intuitive and easy to use the system is, including aspects like user
interfaces and interactions with objects.
What is a Test Case?
A test case is a defined format for software testing required to check if a particular
application/software is working or not. A test case consists of a certain set of conditions that
need to be checked to test an application or software i.e. in more simple terms when
conditions are checked it checks if the resultant output meets with the expected output or not.
2. TEST PLAN
3. TEST CASES
3.n Case-n
3.n.1 Purpose
3.n.2 Inputs
4. TEST LOGS
5. TEST RESULTS
Software Maintenance
Software maintenance is a part of the Software Development Life Cycle. Its primary goal is to modify and
update software application after delivery to correct errors and to improve performance. Software is a model
of the real world. When the real world changes, the software require alteration wherever possible.
Software maintenance aims to ensure that a software system remains functional, efficient, and secure over
time by fixing bugs, adding features, and adapting to changes. It involves testing, version control, and
communication with stakeholders. Maintenance can be costly, so planning and a clear maintenance plan are
essential to manage complexity and expenses effectively.