SOFTWARE ENGINEERING
CHAPTER 3
“Software Testing”
1
Software Testing Software Engineering
Software Testing
Software Testing: Is the process of executing a program find errors before delivery to user.
Benefits
Quality Software: Ensures that errors are detected and corrected before deployment to
customer.
Cost-effective: If errors are detected in the early phases of software testing, it costs less to
fix those errors than to fix when already live.
Without testing, software cannot be deployed to users.
Software Testing Software Engineering 2
Types of Software Testing
Software Testing Software Engineering 3
Types of Software Testing
1.Unit Testing
2.Integration Testing
3.System Testing
4.Acceptance Testing (User Acceptance Test)
5.Basis Path Testing
6.Validation Testing
Software Testing Software Engineering 4
Unit Testing
Unit Testing is a type of software testing where individual software
components are tested.
An individual component can be either an individual function or a procedure
or a module
Unit Testing of the software product is carried out during the development of
an application.
Focus on a relatively small segment, unit or module, and aim to validate that
each unit of the software performs as designed.
Software Testing Software Engineering 5
Unit Testing
Advantages
Test can test parts of the projects without waiting for the others
Focus of functionality
Allow developer to detect errors and resolve early before sending to end user
Disadvantages:
The tester may be biased by previous experience. And the test value may not cover all
possible values.
It is not sufficient to test interaction between units
Software Testing Software Engineering 6
Unit Testing – Example
UNIT Testing
UNITs
Software Testing Software Engineering 7
Unit Testing - Example
Software Testing Software Engineering 8
Integration Testing
Integration testing is the process of testing the interface between two
software units or modules.
Its focus is on determining the correctness of the interface, and expose faults
in the interaction between integrated units.
Second level testing after unit testing
Integration testing aims to expose faults in the interaction between integrated
units.
Once all the modules have been unit tested, integration testing is performed.
Software Testing Software Engineering 9
Unit Testing Versus Integration Testing
Unit Testing Integration Testing
In unit testing, each module of the software In integration testing, all modules of the software
is tested separately. are tested combined.
Unit testing is performed first of all testing Integration testing is performed after unit testing
processes. and before system testing.
Unit testing is white box testing. Integration testing is black box testing.
It tests parts of the project without waiting
It tests only after the completion of all parts.
for others to be completed.
Unit testing is less costly. Integration testing is more costly.
Software Testing Software Engineering 10
Why Integration Testing
The aim is to check
The correctness and communication among modules
When combined sub functions, they produce the desired results
Interfacing errors
Modules interaction with database
Software Testing Software Engineering 11
Integration Testing
Software Testing Software Engineering 12
Types of Integration Testing
Incremental: Testing approach where developers sum up the modules
one after one using stubs or drivers to unfold the defects.
It can either starts to test main module followed by submodules
(Top-down) or starts testing submodules then sum up to test main
(Bottom-up)
Example:
Non Incremental: Also known as Big-bang testing, is a software
testing approach where all components or modules of a system are
integrated simultaneously, and the entire system is tested as a whole
Software Testing Software Engineering 13
System Testing
A kind of black box testing
Quality Assurance (QA) team evaluates how the various components of an
application interact together in the full, integrated system or application
Verifies that an application performs tasks as designed
Focuses on the functionality of an application, for example, might check
that every kind of user input produces the intended output across the
application
Software Testing Software Engineering 14
System Testing
QA team can gauge if an application meets all of its requirements,
which includes technical, business and functional requirements
QA team determines whether a test case corresponds to each of an
application's most crucial requirements and user stories
QA team log and tabulate each defect per requirement
Software Testing Software Engineering 15
User Acceptance Testing (UAT)
The last phase of software testing performed after System Testing, and before making the system available for
actual use. Usually the tests are developed by the customer. Two types of UAT.
Alpha testing: Identify all the possible issues and errors that a product can generate and resolve all those issues
before the final product is delivered to the end user or to the public.
Performed mainly by the in house software QA and testing teams
Can also be done by potential users or customers of the application
Beta testing a type of user acceptance testing where the product team gives a nearly finished product to a group of
target users to evaluate product performance in the real world
Software Testing Software Engineering 16
User Acceptance Testing (UAT)
Alpha Testing Beta Testing
Alpha testing uses both white box and black box
Beta testing commonly uses black-box testing.
testing.
Performed before the product launches into the
Performed at the time of product going to the market.
market.
The main goal is to evaluate the quality of the
The main goal is to evaluate customer satisfaction.
product.
Done by highly skilled employees. They have Done by the end users. They don’t have the technical
knowledge about the software product. knowledge of the software product.
Multiple test cycles are organized in alpha testing. Only one or two test cycles are there in beta testing.
Software Testing Software Engineering 17
User Acceptance Testing Test Case
• A test case is a document, which has a set of test scenarios, preconditions, steps,
data and expected results. scenario in order to verify compliance against a
specific requirement.
• Test Case acts as the starting point for the test execution
Software Testing Software Engineering 18