SE Unit 6
SE Unit 6
SE Unit 6
Software Testing
Content….
Strategic approach to Software Testing
Verification and validation
Organizing for software testing
Software testing strategy
Big picture
Criteria for complication of testing
Software Testing
Definition:
The process or method of finding error/s in a
software application or program so that the
application functions according to the end user's
requirement is called software testing.
It finding the bug in the developed software or
existing software.
Testing is the process of executing a program to find
errors.
To make our software perform well it should be error-
free. If testing is done successfully it will remove all
the errors from the software.
Software Testing is a process of evaluation of the software
on the requirements gathered from system specifications
and users.
Software testing is the process of checking the quality of
a product before launching.
Software Testing is done at the every phase level in
software development life cycle(SDLC).
Can also be done at module level in the program code.
Validation and Verification are two main things that are
included in Software testing.
Software Testing is very important else the software bugs
can be dangerous.
Strategic approach to Software
Testing
Testing is a set of pre-planned activities that can be
conducted systematically.
Following are generic characteristics:
To perform effective testing a software team should
conduct effective formal technical reviews.by doing
this many errors will be eliminated before testing.
Different testing techniques are appropriate at different
points in time.
Testing is conducted by the independent test group.
A strategy for software testing must accommodate
low-level tests that are necessary to verify that a small
source code segment has been correctly implemented
as well as high level tests that validate major system
functions against customer requirements.
Verification and validation
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.
Criteria for completion of testing
The completion criteria are the conditions that are
specified for the stopping the testing.
Sometimes it becomes very difficult to say when the
testing phase is completed and when the product
can be released.
The stop test criteria are as follows:
All the planned testing have been executed and
completed successfully. Also it has been passed.
All the specified goals have been achieved.
All the defects have been removed and all the errors
have been uncovered and resolved successfully.
Detection of defects have been completed within
stipulated time.
The project time has run out.
When we are not able to detect any known serious
defects.
Strategic Issue
following issues must be addressed if a successful
software testing strategy is to be implemented:
Specify product requirements in a quantifiable
manner long before testing commences
State testing objectives explicitly.
Understand the users of the software and develop a
profile for each user category.
Develop a testing plan that emphasizes “rapid cycle
testing.”
Build “robust” software that is designed to test itself.
Use effective formal technical reviews as a filter
prior to testing.
Conduct formal technical reviews to assess the test
strategy and test cases themselves.
Develop a continuous improvement approach for the
testing process.
Test Strategies for Convectional
Software
For the conventional software, there are various
test strategies available for use.
In first one, the team waits for a product
development to be completed and then start
conducting tests.
Different types of test are mentioned as follows:
Unit Testing
Integration Regression Smoke Testing
Testing Testing
Unit Testing
Unit Testing is a type of software testing where
individual units or components of a software are
tested.
The purpose is to validate that each unit of the
software code performs as expected.
Unit testing is the process of checking small pieces of
code to ensure that the individual parts of a program
work properly on their own.
The test strategy is conducted on each of the module
interface to access the proper flow of input and
output and its correctness as per the requirements.
All the Independent path is tested.
Boundary conditions are also tested so that the
software work properly within the boundaries or
within the limits.
All the error handling paths are tested.
Advantages of Unit Testing
Unit testing uses module approach due to that any
part can be tested without waiting for completion of
another parts testing.
The developing team focuses on the provided
functionality of the unit and how functionality should
look in unit test suits to understand the unit API.
Unit testing allows the developer to refactor code
after a number of days and ensure the module still
working without any defect.
Disadvantages of Unit Testing
It cannot identify integration or broad level error as it
works on units of the code.
In the unit testing, evaluation of all execution paths is
not possible, so unit testing is not able to catch each
and every error in a program.
Integration
Testing
Top-Down Bottom-up
Integration Integration
Top-Down Integration:
Top Down Integration Testing is a method in which
integration testing takes place from top to bottom
following the control flow of software system.
The higher level modules are tested first and then
lower level modules are tested and integrated in
order to check the software functionality.
Stubs are used for testing if some modules are not
ready.
Diagram of Top-Down Integration
testing
Advantages:
Fault Localization is easier.
Possibility to obtain an early prototype.
Critical Modules are tested on priority; major design
flaws could be found and fixed first.
Disadvantages:
Needs many Stubs.
It becomes quite complicated due to the high number
of stubs.
Bottom-up Integration:
Bottom-up Integration Testing is a strategy in which
the lower level modules are tested first.
These tested modules are then further used to
facilitate the testing of higher level modules.
The process continues until all modules at top level
are tested.
Once the lower level modules are tested and
integrated, then the next level of modules are
formed.
Diagram of Bottom-Up Integration:
Advantages:
Defects are easily identified.
There is no need to wait for all the modules to be
developed as it saves time.
Disadvantages:
Defects can occur because critical modules are tested
last.
An early prototype is not possible.
`
Test Strategies for object-oriented
software:
Objective of testing OO software is to uncover as much
errors as possible with manageable amount of efforts
and time.
OO testing strategy is same as conventional testing
strategy.
Basic unit of testing is class that contains attributes
and operations. These classes integrate to form OO
architecture. This are called collaborating classes.
Unit Testing in OO Context:
Class is an encapsulation of data attributes and
corresponding set of operation.
In OO software the focus of unit testing is considered
as classes and objects.
Operations within classes are testable units.
In conventional software method we can call as Unit
testing and OO software we can call it as “Class
Testing”.
Conventional software: Algorithmic details and data
flow are considered as units of testing.
In OO software: Encapsulated classes and operations
are unit of testing.
Integration Testing in OO Context:
OO software does not have fixed hierarchical control
structure, so there is no use of top down and bottom up
approach.
Two different strategies for integration testing of OO
systems:
1. Thread-based testing: Integrates the set of classes required
to respond to one input or event for the system. Each thread is
integrated and tested individually. Regression testing is applied
to ensure that no side effects occur.
2. Use-based testing: Begins the construction of the system by
testing those classes (called independent classes) that use
very few (if any) of server classes. After the independent
classes are tested, the next layer of classes, called dependent
classes, that use the independent classes are tested. This
sequence of testing layers of dependent lasses continues until
the entire system is constructed.
Test Strategies for WebApps:
Testing strategies for web apps uses basic principles:
➢ Content model for webapp is reviewed in order to uncover
errors.
➢ Interface model is reviewed to ensure all use cases.
➢ Design model is reviewed to uncover navigation errors.
➢ UI must be tested to remove navigation errors.
➢ Unit Testing done for selected function components.
➢ For complete web architecture, navigation must be tested.
➢ Web application is tested in different environmental
configuration.
➢ Security and performance test must be conducted.
➢ Web app is tested by controlled and monitored group of
users .
Alpha and Beta Testing
Alpha testing is testing of an application when
development is about to complete.
Minor changes can still be made as a result od alpha
testing.
Alpha testing is a type of acceptance testing,
performed to identify all possible issues/bugs
before releasing the product to real users.
This is a form of internal acceptance testing.
Alpha testing is carried out in a lab environment
and usually done by the testers are internal
employees of the organization.
Beta Testing(pre-releasing testing)
Beta testing is performed by real users of the
software application in areal environment and can be
considered as a form of external user acceptance
testing.
Beta version of the software is released to a limited
number of end-users of the product to obtain
feedback on the product quality.
It is the final test before shipping a product to the
customers.
Direct feedback from customers is a major advantage
of Beta testing.
Example: Microsoft corporation released Windows
10 beta and based on the feedback from thousand of
users they managed to release a stable OS version.
Difference between Alpha and Beta
testing: