Testing Strategies
Testing Strategies
Software testing strategy is an approach which incorporates planning of the steps to test the
software.
Verifying software, we ensure that every function in the software is implemented and
functioning accurately.
Validating software, we ensure that the developed software meets the requirements specified by
the customer.
In a simple language, verification answers the question of whether „we are implementing the
software correctly?‟ & validating answers, the question of whether „we are implementing the
correct software?‟.
low-level testing
high-level testing.
Low-level testing is conducted at the core of software design like verifying the code segments
of the software.
high-level testing is conducted to validate software functions against the specified requirements
of the customers.
While developing the software the software engineers first review the customer requirements,
then models it and finally go for coding.
That means while developing the software developers move inwards the spiral in an anti-
clockwise direction.
For testing, initially, the core part of the software is tested, each unit of the software is tested
separately to ensure that as a unit this component functions properly. Then the testing proceeds
outward the spiral along the streamlines. Moving outwards the spiral in the clockwise direction
gradually widens the scope of testing and in each turn, testing integrates the components and
ensure that all the elements of the software are functioning properly and the desired performance
is achieved.
Unit Testing
Unit testing focuses on testing the lowest component of the software individually which is also
called unit. Unit testing involves the testing of each code segment to ensure that it functions
properly.
Integration Testing
The unit components are integrated to implement the complete software. Integration testing
involves testing the design structure of the software which include modelling and software
architecture. It focuses on verifying whether functions of the software are working properly or
not.
Validation Testing
Validation testing focuses on the testing of software against the requirements specified by the
customer.
System Testing
System testing focuses on testing the entire system as a whole and its other system elements. It
tests the performance of the system.
Specify the requirement before testing starts in a quantifiable manner So that testing results are
unambiguous.
According to the categories of the user generate profiles for each category of user(use case
diagram).
Should use the Formal Technical Reviews (FTR) for the effective testing.
To assess the test strategy and test cases FTR should be conducted.
To improve the quality level of testing generate test plans from the users feedback.
1) Unit testing
Unit testing focus on the smallest unit of software design, i.e module or software component.
Test strategy conducted on each module interface to access the flow of input and output.
The local data structure is accessible to verify integrity during execution.
Boundary conditions are tested.
In which all error handling paths are tested.
An Independent path is tested.
Difference between stub and driver
Stub Driver
Stub does not accept test case data. Driver accepts test case data.
It replace the modules of the program into subprograms and are Pass the data to components to be tested c and print
tested by the next driver. the returned result.
Integration testing
In this testing, units or individual components of the software are tested in a group. The focus of
the integration testing level is to expose defects at the time of interaction between integrated
components or units.
Types of Integration Testing
Incremental Approach
In the Incremental Approach, modules are added in ascending order one by one or according to
need. The selected modules must be logically related. Generally, two or more than two modules
are added and tested to determine the correctness of functions. The process continues until the
successful testing of all the modules.
In this type of testing, there is a strong relationship between the dependent modules. Suppose we
take two or more modules and verify that the data flow between them is working fine. If it is,
then add more modules and test again.
o Top-Down approach
o Bottom-Up approach
The top-down testing strategy deals with the process in which higher level modules are tested
with lower level modules until the successful completion of testing of all the modules.
In the top-down approach, we will be ensuring that the module we are adding is the child of the
previous one like Child C is a child of Child B and so on as we can see in the below image:
Bottom-Up Method
The bottom to up testing strategy deals with the process in which lower level modules are tested
with higher level modules until the successful completion of testing of all the modules.
In the bottom-up method, we will ensure that the modules we are adding are the parent of the
previous one as we can see in the below image:
Non- incremental integration testing
We will go for this method, when the data flow is very complex and when it is difficult to find
who is a parent and who is a child. And in such case, we will create the data in any module bang
on all other existing modules and check if the data is present. Hence, it is also known as the Big
bang method.
System testing
System testing is known as the testing behavior of the system or software according to the
software requirement specification.
It is a series of various tests.
It allows to test, verify and validate the business requirement and application architecture.
The primary motive of the tests is entirely to test the computer-based system.
Following are the system tests for software-based system
1. Recovery testing
To check the recovery of the software, force the software to fail in various ways.
Reinitialization, check pointing mechanism, data recovery and restart are evaluated correctness.
2. Security testing
It checks the system protection mechanism and secure improper penetration.
3. Stress testing
System executes in a way which demands resources in abnormal quantity, frequency.
A variation of stress testing is known as sensitivity testing.
4. Performance testing
Performance testing is designed to test run-time performance of the system in the context of an
integrated system.
It always combines with the stress testing and needs both hardware and software requirements.
5. Deployment testing
It is also known as configuration testing.
The software works in each environment in which it is to be operated.
White-Box Testing
The control structure testing is a wide testing study and also improves the quality of white-box
testing.
1) Conditional testing
All the program module and the logical conditions in the program are tested in conditional
testing.
3) Loop testing
It is a white-box testing technique. Loop testing mainly focuses on the validity of the loop
constructs.
2. Nested loops
3. Unstructured loops
The whole object oriented testing revolves around the fundamental entity known as
“class”.
With the help of “class” concept, larger systems can be divided into small well defined
units which may then be implemented separately.
The object oriented testing can be classified as like conventional systems. These are
called as the levels for testing.
Class Testing
In class testing, every individual classes are tested for errors or bugs.
Class testing ensures that the attributes of class are implemented as per the design and
specifications. Also, it checks whether the interfaces and methods are error free of not.
Inter-Class Testing
Inter class testing involves the testing of modules or sub-systems and their coordination with
other modules.
System Testing
o In system testing, the system is tested as whole and primarily functional testing
techniques are used to test the system. Non-functional requirements like
performance, reliability, usability and test-ability are also tested.