0% found this document useful (0 votes)
67 views45 pages

Ppt-Se-Unit 3-Slides - 21hc45t - Software Engineering 2024

Uploaded by

shriramrs24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views45 pages

Ppt-Se-Unit 3-Slides - 21hc45t - Software Engineering 2024

Uploaded by

shriramrs24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 45

An Autonomous Institution

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

SOFTWARE ENGINEERING
Course code 21HC45T Year/Semester II Yr/ IV Sem
Category Professional Core Course (Pcc) L T P C
Course Title SOFTWARE ENGINEERING 3 0 0 3
(Common to CSE & IT)

PRESENTED BY UNIT- III


Dr. J.Senthil Murugan.,Ph.D (TESTING AND MAINTENANCE)
Assoc. Professor
Department of Computer Science and
Engineering
SOFTWARE ENGINEERING
Course Outcomes & Blooms level
Course Outcomes:
BLOOMS
CO. NO. COURSE OUTCOMES LEVEL
On successful completion of this Course, students will be able to
C405.1 Explain the concept of Software life cycle models. K2
C405.2 Analyze the software requirement specification and design software according to the specification. K3
C405.3 Make use of different types of testing techniques and software maintenance. K3
C405.4 Develop project schedule, estimate project cost and effort required. K3
C405.5 Illustrate reusability and distributed software engineering and tools. K2
C405.6 Apply the Software Engineering Concepts for Developing a Project K3

Course Outcomes Mapping With Program Outcomes And Program Specific Outcomes
CO No. PO-1 PO-2 PO-3 PO-4 PO-5 PO-6 PO-7 PO-8 PO-9 PO-10 PO-11 PO-12 PSO-1 PSO-2
C405.1 2 1 - - - - - - - - - 1 2 1
C405.2 3 2 1 - - - - - - - - 1 3 2
C405.3 3 2 1 - - - - - - - - 1 3 2
C405.4 3 2 1 - - - - - - - - 1 3 2
C405.5 2 1 - - - - - - - - - 1 2 1
C405.6 3 2 1 - - - - - - - - 1 3 2
Note: 1: Slight, 2: Moderate, 3: Substantial

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 2
SOFTWARE ENGINEERING
CONTENT
UNIT III TESTING AND MAINTENANCE
-Software testing fundamentals
-Internal and external views of Testing
-white box testing
- basis path testing
- control structure testing
-black box testing
- Regression Testing
-Unit Testing
-Integration Testing
-Validation Testing
-System Testing and Debugging
-Software Implementation Techniques: Coding practices
- Refactoring
-Maintenance and Reengineering
-BPR model
-Reengineering process model
-Reverse and Forward Engineering

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 3
SOFTWARE ENGINEERING
Software testing fundamentals

Definition : Software testing is a critical element of software quality


assurance and represents the ultimate review of specification, design
and coding.
• Testing Objectives
• According to Glen Myers the testing objectives are
• Testing is a process of executing a program with the intend of finding
an error.
• A good test case is one that has high probability of finding an
undiscovered error.
• A successful test is one that uncovers an as-yet undiscovered error.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 4
SOFTWARE ENGINEERING
Software testing fundamentals

Testing Principles
The Pareto principle can be applied to software testing -80 % of all
errors uncovered during testing will likely be traceable to 20 % of all
program modules.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 5
SOFTWARE ENGINEERING
Internal and external views of Testing

Internal and external views of Testing


The internal view is also known as white box testing and the external
view is also known as black box testing.
white box testing
The white box testing is also called as structural testing.
Condition Testing
Loop Testing
Simple loops :
Nested loops :
Concatenated loops :
Unstructured loops :

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 6
SOFTWARE ENGINEERING
Basis Path Testing

Basis path testing


Path testing is a structural testing strategy. This method is intended to
exercise every independent execution path of a program atleast once.
• Following are the steps that are carried out while performing path
testing.
• Step 1 : Design the flow graph for the program or a component.
• Step 2 : Calculate the cyclomatic complexity.
• Step 3 : Select a basis set of path.
• Step 4 : Generate test cases for these paths.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 7
SOFTWARE ENGINEERING
Basis Path Testing

Basis path testing


Step 1 : Design the flow graph for
the program or a component.
Flow graph is a graphical
representation of logical control flow
of the program. Such a graph
consists of circle called a flow graph
node which basically represents one
or more procedural statements and
arrow called as edges or links which
basically represent control flow. In
this flow graph the areas bounded
by nodes and edges are called
regions. Various notations used in
flow graph are

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 8
SOFTWARE ENGINEERING
Basis Path Testing

Basis path testing


• Step 2 : Calculate the cyclomatic complexity.
• The cyclomatic complexity can be computed by three ways.
• Cyclomatic complexity = Total number of regions in the flow graph =
4 (note that in above flow graph regions are given by shaded roman
letters).
• Cyclomatic complexity = E – N + 2 = 13 edges – 11 nodes + 2
• =2+2=4
• Cyclomatic complexity = P + 1 = 3 + 1 = 4. There are 3 predicate
(decision making) nodes : Nodes 3, 5 and 8.
Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 9
SOFTWARE ENGINEERING
Basis Path Testing

Basis path testing


• Step 3 : Select a basis set of path
• The basis paths are
• Path 1 : 1, 2, 3, 4, 5, 6, 7, 11
• Path 2 : 1, 2, 3, 11
• Path 3 : 1, 2, 3, 4, 5, 8, 9, 3 …
• Path 4 : 1, 2, 3, 4, 5, 8, 10, 3 …

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 10
SOFTWARE ENGINEERING
Basis Path Testing

Basis path testing


Step 4 : Generate test cases for these paths.
• After computing cyclomatic complexity and finding independent
basis paths, the test cases has to be executed for these paths. The
format for test case is -

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 11
SOFTWARE ENGINEERING
Control Structure Testing

Control structure testing is used to


increase the coverage area by
testing various control structures
present in the program. The
different types of testing
performed under control
structure testing are as follows-
1. Condition Testing 2. Data Flow
Testing 3. Loop Testing

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 12
SOFTWARE ENGINEERING
Black Box Testing

Basis path testing


• The black box testing is also called as behavioural testing.
• Black box testing methods focus on the functional requirements of
the software. Test sets are derived that fully exercise all functional
requirements.
• The black box testing is not an alternative to white box testing and it
uncovers different class of errors than white box testing.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 13
SOFTWARE ENGINEERING
Black Box Testing

Equivalence Partitioning
It is a black box technique that divides the input domain into
classes of data. From this data test cases can be derived.
• An ideal test case uncovers a class of errors that might require
many arbitrary test cases to be executed before a general error
is observed.
• In equivalence partitioning the equivalence classes are
evaluated for given input condition. Equivalence class
represents a set of valid or invalid states for input conditions.
• Equivalence class guidelines can be as given below :
• If input condition specifies a range, one valid and two
invalid equivalence classes are defined.
• If an input condition requires a specific value, one valid
and two invalid equivalence classes are defined.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 14
SOFTWARE ENGINEERING
Black Box Testing
Boundary Value Analysis (BVA)
• Boundary value analysis is done to check boundary conditions.
• A boundary value analysis is a testing technique in which the elements at the edge
of the domain are selected and tested.
• Using boundary value analysis, instead of focusing on input conditions only, the test
cases from output domain are also derived.
• Boundary value analysis is a test case design technique that complements
equivalence partitioning technique.
• Guidelines for boundary value analysis technique are
• If the input condition specified the range bounded by values x and y, then test cases
should be designed with values x and y. Also test cases should be with the values
above and below x and y.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 15
SOFTWARE ENGINEERING
Black Box Testing
Boundary Value Analysis (BVA)
• If the output condition specified the range bounded by values x and y, then test
cases should be designed with values x and y. Also test cases should be with the
values above and below x and y.
• If output condition specifies the number of values then the test cases should be
designed with minimum and maximum values as well as with the values that are
just above and below the maximum and minimum should be tested.
• If the internal program data structures specify such boundaries then the test cases
must be designed such that the values at the boundaries of data structure can be
tested.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 16
SOFTWARE ENGINEERING
Black Box Testing
Boundary Value Analysis (BVA)
• For example :
• Integer D with input condition [– 2, 10],
Test values : – 2, 10, 11, – 1, 0
• If input condition specifies a number
values, test cases should developed to
exercise the minimum and maximum
numbers. Values just above and below
this min and max should be tested.
• Enumerate data E with input condition :
{2, 7, 100, 102}
• Test values : 2, 102, – 1, 200, 7
Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 17
SOFTWARE ENGINEERING
Black Box Testing
Comparison between Black Box Testing and White Box Testing

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 18
SOFTWARE ENGINEERING
Testing Strategy
Testing Strategy
‘testing-in-the-small’ and move toward ‘testing-in-the-large’.
Various testing strategies for conventional software are
• Unit testing - In this type of testing techniques are applied to detect the
errors from each software component individually.
• Integration testing - It focuses on issues associated with verification and
program construction as components begin interacting with one another.
• Validation testing - It provides assurance that the software validation
criteria (established during requirements analysis) meets all functional,
behavioural, and performance requirements.
• System testing - In system testing all system elements forming the system is
tested as a whole.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 19
SOFTWARE ENGINEERING
Testing Strategy Unit testing

Testing Strategy
• Unit Testing: In unit testing the
individual components are tested
independently to ensure their quality.

Unit testing environment

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 20
SOFTWARE ENGINEERING
Testing Strategy

Testing Strategy
• Integration Testing
A group of dependent components are
tested together to ensure their quality
of their integration unit.

Integration testing approach

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 21
SOFTWARE ENGINEERING
Testing Strategy

Testing Strategy
• Top Down Integration Testing
Top down testing is an incremental
approach in which modules are
integrated by moving down through the
control structure.

Program structure

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 22
SOFTWARE ENGINEERING
Testing Strategy

Testing Strategy
• Bottom Up Integration Testing
• In bottom up integration the modules at
the lowest levels are integrated at first,
then integration is done by moving
upward through the control structure.

Bottom up integration testing

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 23
SOFTWARE ENGINEERING
Testing Strategy

Testing Strategy
• Regression Testing
• Regression testing is used to check for defects propagated to other modules by changes made
to existing program. Thus regression testing is used to reduce the side effects of the changes.
Smoke Testing
• The smoke testing is a kind of integration testing technique used for time critical projects
wherein the project needs to be assessed on frequent basis.
• Following activities need to be carried out in smoke testing -
• Software components already translated into code are integrated into a “build”. The
“build” can be data files, libraries, reusable modules or program components.A series of
tests are designed to expose errors from build so that the “build”
• performs its functioning correctly.
• The “build” is integrated with the other builds and the entire product is smoke tested daily.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 24
SOFTWARE ENGINEERING
Testing Strategy
Validation Testing
• The integrated software is tested based on requirements to ensure that the desired product is
obtained.
Acceptance Testing
• The acceptance testing is a kind of testing conducted to ensure that the software works correctly in the
user work environment.
• The acceptance testing can be conducted over a period of weeks or months. The types of acceptance
testing are
• 1. Alpha test - The alpha testing is a testing in which the version of complete software is tested by the
customer under the supervision of developer. This testing is performed at developer’s site. The
software is used in natural setting in presence of developer. This test is conducted in controlled
environment.
• Beta test - The beta testing is a testing in which the version of software is tested by the customer
without the developer being present. This testing is performed at customer’s site. As there is no
presence of developer during testing, it is not controlled by developer. The end user records the
problems and report them to developer. The developer then makes appropriate modification.
Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 25
SOFTWARE ENGINEERING
Testing Strategy
System Testing
• The system test is a series of tests conducted for fully the computer based
system. Various types of system tests are
• 1. Recovery testing2. Security testing
• Stress testing 4. Performance testing The main focus of such testing
is to test
Recovery Testing
• Recovery testing is intended to check the system’s ability to recover from
failures.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 26
SOFTWARE ENGINEERING
Testing Strategy
Security Testing
Security testing verifies that system protection mechanism prevent
improper penetration or data alteration.
Stress Testing
• Determines breakpoint of a system to establish maximum service level.
Performance Testing
• Performance testing evaluates the run time performance of the software,
especially real time software.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 27
SOFTWARE ENGINEERING
System Testing and Debugging
Debugging
Debugging is a process of removal of a defect. It occurs as a consequence
of successful testing.
• Brute force method - The memory dumps and run-time traces are examined and
program with write statements is loaded to obtain clues to error causes.
• In this method “Let computer find the error” approach is used.
• This is the least efficient method of debugging.
• Backtracking method - This method is applicable to small programs.
• In this method, the source code is examined by looking backwards from symptom to
potential causes of errors.
• Cause elimination method - This method uses binary partitioning to reduce the
number of locations where errors can exist.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 28
SOFTWARE ENGINEERING
System Testing and Debugging
Debugging
Debugging is a
process of
removal of a
defect. It
occurs as a
consequence
of successful
testing.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 29
SOFTWARE ENGINEERING
System Testing and Debugging
Debugging

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 30
SOFTWARE ENGINEERING
System Testing and Debugging
Debugging
• Software Implementation Techniques
• After detailed system design we get a system
design which can be transformed into
implementation model. The goal coding is to
implement the design in the best possible
manner. Coding affects both testing and
maintenance very deeply. The coding should be
done in such a manner that the task of testing and
maintenance phase should get simplified.
• Coding Practices
• There are some commonly used programming
practices that help in avoiding the common errors.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 31
SOFTWARE ENGINEERING
System Testing and Debugging
User defined data types
• Modern programming languages allow the user to use defined data types as the
enumerated types. Use of user defined data types enhances the readability of the code.
Module size
• There is no standard rule about the size of the module but the large size of the module will
not be functionally cohesive.
Module interface
• Complex module interface must be carefully examined. A simple rule of thumb is that the
module interface with more than five parameters must be broken into multiple modules
with simple interface.
Coding Standards
• Any good software development approach suggests to adhere to some well-defined
standards or rules for coding. These rules are called coding standards.
Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 32
SOFTWARE ENGINEERING
Refactoring
Refactoring Refactoring is defined as a change
• A change in the code is very common in the made to the internal structure of
software for better understanding and
software development process. Due to change in the performing cheaper to modifications
requirements or due to addition of new functionality without changing system's behaviour.
the changes occur in the coding.
• For accommodating those changes in the code we
need to change the design. If we plan to code as per
the changed design, then code becomes very
complex. Productivity and quality deteriorates.
• Refactoring is the technique used to improve the
code and avoid the design decay with time.
• Refactoring is done during the coding. It also plays
an important role in test driven development in
code improvement step.
Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 33
SOFTWARE ENGINEERING Maintenance and
Software Maintenance Reengineering
• Types of Software Maintenance Software maintenance is an
activity in which program is
• Various types of software maintenance are
modified after it has been put
• Corrective maintenance - Means the maintenance for into use.
correcting the software faults. In software maintenance
• Adaptive maintenance - Means maintenance for usually it is not preferred to
adapting the change in environment (different apply major software changes
computers or different operating systems). to system’s
• Perfective maintenance - Means modifying or
enhancing the system to meet the new requirements.
• Preventive maintenance - Means changes
made to improve future
maintainability.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 34
SOFTWARE ENGINEERING
Software Maintenance
Issues in Software Maintenance

Maintenance process

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 35
SOFTWARE ENGINEERING
BPR Model
BPR Model
• The BPR model is evolutionary process model. It is iterative in nature.
• There are six activities carried out in this model.
• Business Process Definition :
• The processes are defined based on business goals.
• The business goals are defined using the key factors -
• Cost reduction
• Quality improvement
• Time reduction and
• Personnel development.
• Process Identification :
• The critical processes are identified.
• They are prioritized according to their need for change.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 36
SOFTWARE ENGINEERING
BPR Model
• Process Evaluation :
• The existing processes are analyzed.
• Various tasks that constitute a process are identified.
• The time and cost required by these tasks are measured.
• The quality performance issues are identified and isolated.
• Process Specification and Design :
• The use cases are prepared for each process that need to be redesigned in BPR.
• Each use case captures the scenario that give out some outcome to the customer.
• On analyzing the use cases, new tasks are redesigned if required.
• Prototyping :
• Before integrating it to the system, the redesigned process is prototyped for testing
• purpose.
• Refinement and Instantiation :
• The feedback for each prototype in BPR model is collected.
• The processes are refined based on the feedback.
Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 37
SOFTWARE ENGINEERING
BPR Model

BPR Model
Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 38
SOFTWARE ENGINEERING
Reengineering Process Model
Reengineering Process Model
• Software reengineering is a process of modifying the system for maintenance purpose.
The software reengineering process model depicts six activities
• Inventory Analysis : Software reengineering process model
• The software organization possess the inventory of all the required applications.
• This inventory should be revisited periodically.
• The resources can be allotted to the candidate applications for reengineering work.
• According to the changes in the candidate applications their status need to be updated.
• Document Restructuring :
• Documents are essential part of software project lifecycle. But inadequate or inappropriate
approach of documentation leads to document restructuring activity.
• There are three alternatives that can be chosen for document restructuring -
• Instead of having time consuming documentation, remain with weak documentation.
• Update poor documentation if needed.
• For the critical systems, rewrite the documents if needed

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 39
SOFTWARE ENGINEERING
Reengineering Process Model
•Reverse Engineering :
•Reverse engineering is the process of design recovery.
•In reverse engineering the data, architectural and procedural information is extracted
from a source code.
•The reverse engineering creates a representation of the program at a higher level of
abstraction than the source code.
• Code Restructuring :
•This is an activity in which the code is analyzed.
•If the programming constructs are violated then that code is restructured.
•Sometimes the code is rewritten in modern programming language.
•The resultant restructured code is tested and reviewed.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 40
SOFTWARE ENGINEERING
Reengineering Process Model
• Data Restructuring :
•Data restructuring is large scale reengineering activity.
•In this activity, data architecture is dissected and necessary data models are refined.
•If data structures are weak then data are reengineered.
•The changes in data demand for changes in architecture or code.
•Forward Engineering
•Forward engineering is a process in which the design information is recovered from the
existing software and the overall quality of the code is improved.
•Many times new functionalities are added in the existing system to improve overall
performance.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 41
SOFTWARE ENGINEERING
Reverse and Forward Engineering
Reverse and Forward Engineering
• Reverse engineering is the process of design recovery. In reverse engineering the data, architectural and
procedural information is extracted from a source code.
• There are three important issues in reverse engineering.
• Abstraction level : This level helps in obtaining the design information from the source code. It is expected
that abstraction level should be high in reverse engineering. High abstraction level helps the software
engineer to understand the program.
• Completeness level : The completeness means detailing of abstract level. The completeness decreases as
abstraction level increases.
• For example - From a given source code listing one can easily develop a complete procedural design
representation. But it is very difficult to develop complete set of data flow diagrams or entity relationship
diagram. The completeness in reverse engineering develops the interactivity. The term interactivity means
the degree to which the human is integrated with automated tools to create effective reverse engineering
process. As the abstraction level increases the interactivity must increase to bring the completeness.
• Directionality level : Directionality means extracting the information from source code and give it to
software engineer. The directionality can be one way or two way. The one way directionality means
extracting all the information from source code and give it to software engineer. The two way directionality
means the information taken from source code is fed to a re-engineering tool that attempts to restructure or
regenerate old programs.
Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 42
SOFTWARE ENGINEERING
Reverse and Forward Engineering
Reverse and Forward Engineering

Reverse engineering
Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 43
SOFTWARE ENGINEERING
Reverse and Forward Engineering
Forward Engineering
• If the poorly designed and implemented code is to be modified then following
alternatives can be adopted -
• Make lot of modifications to implement the necessary changes.
• Understand inner workings of the program in order to make the necessary
modifications.
• Redesign, recode and test small modules of software that require modifications.
• Completely redesign, recode and test the entire program using re-engineering
tool.
• Definition : Forward engineering is a process that makes use of software
engineering principles, concepts and methods to re-create an existing application.
This re-developed program extends the capabilities of old programs.

Vel Tech High Tech Dr Rangarajan Dr Sakunthala Engineering College An Autonomous Institution 44
Thank you

06/02/2024

You might also like