Module 5: Software Testing Fundamentals
Testing Levels: Unit, Integration, System
Testing Techniques: Black Box, White Box, Grey Box
Test Case Design, Testing Strategies: Regression, Smoke,
Acceptance
Test Planning, Execution, Test Automation Frameworks
Testing Levels:
Software Testing is an activity performed to identify errors so that errors can be
removed to obtain a product with greater quality.
In software testing, we have four different levels of testing, which are as
discussed below:
1. Unit Testing
2. Integration Testing
3. System Testing
4. Acceptance Testing
Unit Testing:
Unit Testing (Component testing) is a software testing technique in which
individual units or components of a software application are tested in
isolation.
These units are the smallest pieces of code, typically functions or
methods, ensuring they perform as expected.
Unit testing helps in identifying bugs early in the development cycle,
enhancing code quality, and reducing the cost of fixing issues later.
In a testing level hierarchy, unit testing is the first level of testing done
before integration and other remaining levels of the testing.
Unit testing strategies :
To create effective unit tests, follow these basic techniques to ensure all
scenarios are covered:
Logic checks: Verify if the system performs correct calculations and
follows the expected path with valid inputs.
Boundary checks: Test how the system handles typical, edge case, and
invalid inputs. (For example, if an integer between 3 and 7 is expected,
check how the system reacts to a 5 (normal), a 3 (edge case), and a 9
(invalid input).)
Error handling: Check the system properly handles errors. Does it prompt
for a new input, or does it crash when something goes wrong?
Object-oriented checks: If the code modifies objects, confirm that the
object’s state is correctly updated after running the code.
Integration Testing :
Integration testing is the process of testing the interface between two
software units or modules.
The purpose of integration testing is to expose faults in the interaction
between integrated units.
Once all the modules have been unit-tested, integration testing is
performed.
We always do integration testing by picking module by module so that a
proper sequence is followed, and also we don't miss out on any
integration scenarios.
By detecting and resolving integration problems early, integration testing
contributes to the overall reliability, performance, and quality of the
software product.
There are four types of integration testing approaches.
1. Big-Bang Integration Testing
It is the simplest integration testing approach, where all the modules are
combined and the functionality is verified after the completion of
individual module testing.
In simple words, all the modules of the system are simply put together
and tested.
2. Top-Down Integration Testing
• In this integration testing, testing takes place from top to
bottom. First, high-level modules are tested and then low-
level modules and finally integrating the low-level modules
to a high level to ensure the system is working as intended.
3. Bottom-Up Integration Testing
In bottom-up testing, each module at lower levels are tested with higher
modules until all modules are tested.
4. Mixed Integration Testing
A mixed integration testing is also called sandwiched integration testing. A
mixed integration testing follows a combination of top down and bottom-up
testing approaches.
Difference between Unit and Integration Testing:
S. Unit Testing Integration Testing
No.
1. In unit testing, each module of the In integration testing, all modules
software is tested separately. of the software are tested
combined.
2. In unit testing tester knows the Integration testing doesn’t know
internal design of the software. the internal design of the software.
3. Unit testing is performed first of Integration testing is performed
all testing processes. after unit testing and before
system testing.
4. Unit testing is white box testing. Integration testing is black box
testing.
5. Unit testing is performed by the Integration testing is performed by
developer. the tester.
6. Unit testing is responsible to Error detection takes place when
observe only the functionality of modules are integrated to create
the individual units. an overall system.
System Testing :
System testing is a type of software testing that evaluates the overall
functionality and performance of a complete and fully integrated software
solution.
It tests if the system meets the specified requirements and if it is suitable
for delivery to the end-users.
System Testing is a black-box testing. It is performed after the integration
testing and before the acceptance testing.
System Testing Process
System Testing is performed in the following steps:
Test Environment Setup: Create testing environment for the better quality
testing.
Create Test Case: Generate test case for the testing process.
Create Test Data: Generate the data that is to be tested.
Execute Test Case: After the generation of the test case and the test data,
test cases are executed.
Defect Reporting: Defects in the system are detected.
Regression Testing: It is carried out to test the side effects of the testing
process.(It involves retesting the previously tested functionalities to
verify that recent code changes haven’t adversely affected the existing
features.)
Log Defects: Defects are fixed in this step.
Retest: If the test is not successful then again test is performed.
Types of System Testing
Performance Testing: Performance Testing is a type of software testing
that is carried out to test the speed, scalability, stability and reliability of
the software product or application.
Load Testing: Load Testing is a type of software Testing which is carried
out to determine the behavior of a system or software product under
extreme load.
Stress Testing: Stress Testing is a type of software testing performed to
check the robustness of the system under the varying loads.
Scalability Testing: Scalability Testing is a type of software testing
which is carried out to check the performance of a software application or
system in terms of its capability to scale up or scale down the number of
user request load.
Usability Testing :The purpose of this testing to make sure that the
system is well familiar with the user and it meets its objective for what it
supposed to do.
Security Testing: Here, testers identify vulnerabilities and weaknesses in
the system’s security measures to protect sensitive data.
Migration testing: This testing ensures that the application can be moved
from one environment to another, such as from a development
environment to a production environment.
Functional testing: This testing ensures the application meets its
functional requirements. It is essential to functional test the application
thoroughly to ensure it is ready for use by the end users.