Software Testing
Software Testing
Objective
The objective of this chapter is to show the
• Unit Testing
• Integration Testing
• System Testing
• Functional Testing
• Acceptance Testing
• Smoke Testing
• Regression Testing
• Performance Testing
• Security Testing
• User Acceptance Testing
Unit Testing (White Box) continued…
• Unit testing is a method of testing individual units or components of a
software application.
• It is typically done by developers and is used to ensure that the
individual units of the software are working as intended.
• Unit tests are usually automated and are designed to test specific parts
of the code, such as a particular function or method.
• Unit testing is done at the lowest level of the software development
process, where individual units of code are tested in isolation.
Unit Testing (White Box)
• It helps to identify bugs early in the development process, before they
become more difficult and expensive to fix.
• It helps to ensure that changes to the code do not introduce new bugs.
• It makes the code more modular and easier to understand and maintain.
• It helps to improve the overall quality and reliability of the software.
• Disadvantage:
• The tester may be biased by previous experience. And the test value
may not cover all possible values.
Function Testing (Black Box)
Black box testing is a type of functional testing that involves testing the
functionality of an application or system without knowing anything
about the internals of the code. In other words, you test the application
as if you were a user who doesn't know anything about how it works.
• Designed to exercise the to its external specifications
• Testers not biased by knowledge of the program’s design.
• Disadvantages:
• The need for explicitly stated requirements
• Only cover a small portion of the possible test conditions.
Integration Testing
• Integration testing is a method of testing how different units or
components of a software application interact with each other.
• It is used to identify and resolve any issues that may arise when different
units of the software are combined.
• Integration testing is typically done after unit testing and before
functional testing, and is used to verify that the different units of the
software work together as intended.
• Integration testing types:
• Top-down Integration Test
• Bottom-up Integration Test
Top-down Integration Test
• It starts with the highest level modules and differentiate them with
lower-level modules.
• Advantages:
• No test drivers needed
• Interface errors are discovered early
• Modular features aid debugging
• Disadvantages: Test stubs are needed
• Errors in critical modules at low levels are found late.
Top-down Testing
T1
T1 A
T2
T2 B
B T3
T3
C
T4
Bottom-up Integration Test
• It starts with the lowest-level modules and integrates them with
higher-level modules.
• Advantages: No test stubs are needed
Errors in critical modules are found early
Test Test
Drivers Drivers
• This test is done to make sure that the software under testing is ready
or stable for further testing
It is called a smoke test as the testing of an initial pass is done to check
if it did not catch the fire or smoke in the initial switch on.
Example:
• If the project has two modules so before going to module 2 make sure
that module 1 is working properly
Regression testing
• Regression testing is a method of testing that is used to ensure that
changes made to the software do not introduce new bugs or cause
existing functionality to break.
• It is typically done after changes have been made to the code, such as
bug fixes or new features, and is used to verify that the software still
works as intended.
Regression testing continued…
• Regression testing can be performed in different ways, such as:
• Retesting: This involves testing the entire application or specific
functionality that was affected by the changes.
• Re–execution: This involves running a previously executed test suite
to ensure that the changes did not break any existing functionality.
• Comparison: This involves comparing the current version of the
software with a previous version to ensure that the changes did not
break any existing functionality.
Advantages
• The main advantages of regression testing include:
• It helps to ensure that changes made to the software do not introduce new bugs
or cause existing functionality to break.
• It helps to ensure that the software continues to work as intended after changes
have been made.
• It helps to improve the overall reliability and stability of the software.
• It’s important to keep in mind that regression testing is an ongoing process that
should be done throughout the software development
• lifecycle to ensure that the software continues to work as intended. It should
be automated as much as possible to save time and resources. Additionally, it’s
important to have a well-defined regression test suite that covers
Performance Testing
• It is designed to test the run-time performance of software within the
context of an integrated system.
• It is used to test the speed and effectiveness of the program.
• It is also called load testing. In it we check, what is the performance of
the system in the given load.
• Example:
• Checking several processor cycles.
Object-Oriented Testing
• Big companies keep a special library with all copies of test reports,
incident forms, and test plans
Real-Time Testing
• Real-Time testing is necessary because the deployment system is
usually more complicate than development system
• Rules apply for testing real time system
• Evaluate possible deadlocks, thrashing to special timing conditions
• Use tests to simulate hardware faults.
• Use hardware simulation to stress the software design.
• Design ways to simulate modules missing in the development system.
Advantages:
• Advantages of software testing:
• Improved software quality and reliability
• Early identification and fixing of defects
• Improved customer satisfaction
• Increased stakeholder confidence
• Reduced maintenance costs
Disadvantages
• Disadvantages of software testing:
• Time-consuming and adds to project cost
• Can slow down development process
• Not all defects can be found
• Can be difficult to fully test complex systems
• Potential for human error during testing process