SE Unit 6

Download as pdf or txt
Download as pdf or txt
You are on page 1of 50

Unit -VI

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

 Verification and Validation is the process of


investigating that a software system satisfies
specifications and standards and it fulfills the
required purpose.

Verification: Are we building the product right?


Validation: Are we building the right product?
Verification:
 Verification is the process of checking that a software
achieves its goal without any bugs.
 It is the process to ensure whether the product that
is developed is right or not.
 It verifies whether the developed product fulfills the
requirements that we have.
 Verification is Static Testing.
 "we are developing the right product or not".
 And it also checks that the developed application
fulfilling all the requirements given by the client.
Validation:
 Validation is the process of checking whether the
software product is up to the mark or in other words
product has high level requirements.
 It is the process of checking the validation of product
i.e. it checks what we are developing is the right
product.
 it is validation of actual and expected product.
 Validation is the Dynamic Testing.
 Activities involved in validation:
➢Black box testing
➢White box testing
➢Unit testing
➢Integration testing
 Here we are ensuring that "we have developed the
product right." And it also checks that the software
meets the business needs of the client.
Note: Verification is followed by Validation.
Difference between Verification and
validation:
Organizing for Software Testing
 The software developer is always responsible for
testing the individual units (modules) of the program
ensuring that each performs the function for which it
was designed.
 In many cases, the developer also conducts
integration testing.
 A testing step that leads to construction of the
complete program structure.
 only after the software architecture is complete,
does an independent test group (ITG) become
involved.
 The role of an ITG is to remove the inherent
problems associated with letting the builder test the
thing that has been built.
 Independent testing removes the conflict of
interest that may otherwise present. After all,
personnel in the ITG team are paid to find errors.
 The ITG is part of the software development project
team in the sense that it becomes involved during the
specification process and stays involved (planning
and specifying test procedures) throughout a large
project.
Software Testing Strategy
 Software testing strategy is an approach which
incorporates planning of the steps to test the
software along with the planning of time, effort &
resources that will be required to test the software.
 The software is developed by moving INWARDS in
the spiral.
 Testing is conducted by moving OUTWARDS in the
spiral.
Diagram of Software Testing
Strategy
System engineering:
 Defines the roles of software and lead to
requirements analysis.
 Performance constraints, validation criteria,
functionality of software.
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.
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.

Question: Explain the Unit Testing 5 marks


Integration Testing
 Integration testing is the process of testing the
interface between two software units or modules.
 It focuses on determining the correctness of the
interface.
 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.
 Integration testing is a software testing technique
that focuses on verifying the interactions and data
exchange between different components or modules
of a software application.
 The goal of integration testing is to identify any
problems or bugs that arise when different
components are combined and interact with each
other.
 Following are Two different Integration Strategies:

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.

Question: What do you understand by Integration Testing? 6 marks


Regression Testing:
 Regression Testing is a type of software testing that
verifies that changes made to the system such as bug
fixes or new features do not impact previously
working functionality.
 In regression testing the software architecture
changes every time when a new module is added as
part of integration testing.
 Regression testing is used to check for detects
propagated to other modules by changes made to
existing program.
Smoke Testing:
 Smoke Testing is a type of software testing which is
usually performed on initial software builds to
make sure that the critical functionalities of the
program are working absolutely fine.

 `
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:

You might also like