SOFTWARE TESTING.pptx

SOFTWARE TESTING
UNIT III
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
OBJECTIVE
• What is Software Testing?
• Software testing fundamentals
• Test Case Design
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
• Software testing is a critical element of software
quality assurance and represents the ultimate
review of specification, design, and code
generation
• e.g., flight control, nuclear reactor monitoring
• Software testing fundamentals define the
overriding objectives for software testing
• Test case design focuses on a set of techniques
for the creation of test cases that meet overall
testing objectives
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
SOFTWARE TESTING FUNDAMENTALS
• The engineer creates a series of test cases that
are intended to "demolish" the software that
has been built
• software process that could be viewed
(psychologically, at least) as destructive rather
than constructive
• Myth-we were really good at programming
• There would be no bugs to catch
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Testing Objectives
• 1. Process of executing a program with the
intent of finding an error
• 2. A good test case - finding an as-yet
undiscovered error
• 3. A successful test is one that uncovers an as-
yet-undiscovered error
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Testing Principles
• Software engineer must understand the basic
principles that guide software testing
• All tests should be traceable to customer requirements
• Tests should be planned long before testing begins
• The Pareto principle applies to software
testing(80/20%)
• Testing should begin “in the small” and progress
toward testing “in the large”
• Exhaustive testing is not possible
• To be most effective, testing should be conducted by
an independent third party
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Testability
• Software testability is simply how easily can
be tested
• Metrics that could be used to measure
testability in most of its aspects
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Operability
• "The better it works, the more efficiently it
can be tested“
• The system has few bugs (bugs add analysis
and reporting overhead to the test process)
• No bugs block the execution of tests
• The product evolves in functional stages
(allows simultaneous development)
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Observability
• Distinct output is generated for each input
• System states and variables are visible or queriable
during execution
• Past system states and variables are visible or queriable
(e.g., transaction logs)
• All factors affecting the output are visible
• Incorrect output is easily identified
• Internal errors are automatically detected through self-
testing mechanisms
• Internal errors are automatically reported
• Source code is accessible
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Controllability
• The better control the software, the more the testing
can be automated and optimized
• All possible outputs can be generated through some
combination of input
• All code is executable through some combination of
input
• Software and hardware states and variables can be
controlled directly by the test engineer
• Input and output formats are consistent and structured
• Tests can be conveniently specified, automated, and
reproduced.
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Decomposability
• "By controlling the scope of testing, we can
more quickly isolate problems and perform
smarter retesting
– The software system is built from independent
modules.
– Software modules can be tested independently.
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Simplicity
• The less there is to test, the more quickly we can
test it
• Functional simplicity (e.g., the feature set is the
minimum necessary to meet requirements
• Structural simplicity (e.g., architecture is
modularized to limit the propagation of faults).
• Code simplicity (e.g., a coding standard is
adopted for ease of inspection and maintenance)
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Stability
• "The fewer the changes, the fewer the
disruptions to testing.
– Changes to the software are infrequent
– Changes to the software are controlled
– Changes to the software do not invalidate existing
tests
– The software recovers well from failures
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Understandability
• The more information we have, the smarter
we will test
– The design is well understood
– Dependencies between internal, external, and
shared components are well understood
– Changes to the design are communicated
– Technical documentation is instantly accessible
– Technical documentation is well organized
– Technical documentation is specific and detailed
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
What are the attributes of a “good”
test?
• A good test has a high probability of finding an
error
• A good test is not redundant
• A good test should be “best of breed”
• A good test should be neither too simple nor
too complex
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
TEST CASE DESIGN
• The design of tests for software and other
engineered products can be as challenging as
the initial design of the product itself
• A rich variety of test case design methods
have evolved for software
• Any engineered product (and most other
things) can be tested in one of two ways
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
• Black-box testing - the tester is not concerned
with the internal knowledge or Implementation
details of the software, but rather focuses on
validating the functionality based on the provided
specifications or requirements
• White-box testing- White box testing is a form of
application testing that provides the tester with
complete knowledge of the application being
tested, including access to source code and
design documents
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
WHITE-BOX TESTING
• White-box testing, sometimes called glass-box
testing
• The software engineer can derive test cases
– guarantee that all independent paths within a module
have been exercised at least once
– exercise all logical decisions on their true and false
sides
– execute all loops at their boundaries and within their
operational bounds, and
– exercise internal data structures to ensure their
validity
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
• Logic errors and incorrect assumptions are
inversely proportional to the probability that a
program path will be executed
• We often believe that a logical path is not
likely to be executed when, in fact, it may be
executed on a regular basis
• Typographical errors are random
– Each of these reasons provides an argument for
conducting white-box tests
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
BASIS PATH TESTING
• Basis path testing is a white-box testing
technique first proposed by Tom McCabe
• The basis path method enables the test case
designer to derive a logical complexity
measure of a procedural design
• Test cases derived to exercise the basis set are
guaranteed to execute every statement in the
program at least one time during
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Flow Graph Notation
• A simple notation for the representation of
control flow, called a flow graph (or program
graph
• The flow graph depicts logical control flow
using the notation illustrated in Figure
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
• Figure 17.2B maps the flowchart into a
corresponding flow graph
• A sequence of process boxes and a decision
diamond can map into a single node
• The arrows on the flow graph, called edges or
links, represent flow of control and are
analogous to flowchart arrows
• Areas bounded by edges and nodes are called
regions
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
FLOW GRAPH
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
A compound condition occurs when one or more Boolean
operators (logical OR, AND, NAND, NOR) is present in a
conditional statement
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Cyclomatic Complexity
• Cyclomatic complexity is a software metric
that provides a quantitative measure of the
logical complexity of a program
• path 1: 1-11
• path 2: 1-2-3-4-5-10-1-11
• path 3: 1-2-3-6-8-9-10-1-11
• path 4: 1-2-3-6-7-9-10-1-11
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
• Cyclomatic complexity has a foundation in graph theory
and provides us with an extremely useful software metric
• Complexity is computed in one of three ways:
– 1. The number of regions of the flow graph correspond to the
cyclomatic complexity
– 2. Cyclomatic complexity, V(G), for a flow graph, G, is defined as
V(G) = E -N + 2
– where E is the number of flow graph edges, N is the number of
flow graph nodes.
– 3. Cyclomatic complexity, V(G), for a flow graph, G, is also
defined as V(G) = P + 1
• where P is the number of predicate nodes contained in the flow graph
G
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
• The flow graph has four regions.
• 2. V(G) = 11 edges 9 nodes + 2 = 4
• 3. V(G) = 3 predicate nodes + 1 = 4
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Deriving Test Cases
• The following steps can be applied to derive
the basis set:
– Using the design or code as a foundation, draw a
corresponding flow graph
– Determine the cyclomatic complexity of the
resultant flow graph
• The cyclomatic complexity, V(G), is determined by
applying the algorithms
– Determine a basis set of linearly independent
paths
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
• Each test case is executed and compared to
expected results
• Once all test cases have been completed, the
tester can be sure that all statements in the
program have been executed at least once
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Graph Matrices
• To develop a software tool that assists in basis
path testing, a data structure, called a graph
matrix, can be quite useful.
• A graph matrix is a square matrix whose size (i.e.,
number of rows and columns) is equal to the
number of nodes on the flow graph
• Referring to the figure, each node on the flow
graph is identified by numbers, while each edge is
identified by letters
• The graph matrix is nothing more than a tabular
representation of a flow graph
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
CONTROL STRUCTURE TESTING
• These broaden testing coverage and improve
quality of white-box testing
• Condition Testing: Condition testing is a test
case design method that exercises the logical
conditions contained in a program module
• A simple condition is a Boolean variable or a
relational expression
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
• If a condition is incorrect, then at least one
component of the condition is incorrect
• Types of errors in a condition include the
following:
• • Boolean operator error (incorrect/missing/extra
Boolean operators).
• • Boolean variable error
• • Boolean parenthesis error
• • Relational operator error
• • Arithmetic expression error
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Data Flow Testing
• The data flow testing method selects test paths of a
program according to the locations of definitions and
uses of variables in the program
• DEF(S) = {X | statement S contains a definition of X}
• USE(S) = {X | statement S contains a use of X
• Data flow testing strategies are useful for selecting test
paths of a program containing nested if and loop
statements
• To illustrate this, consider the application of DU testing
to select test paths for the PDL that follows
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Loop Testing
• Loop testing is a white-box testing technique that
focuses exclusively on the validity of loop constructs.
• Four different classes of loops: simple loops,
concatenated loops, nested loops, and unstructured
loops
• Simple loops:
– 1. Skip the loop entirely
– 2. Only one pass through the loop
– 3. Two passes through the loop
– 4. m passes through the loop where m < n. 5. n 1, n, n + 1
passes through the loop
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
BLACK-BOX TESTING
• Black-box testing, also called behavioral
testing, focuses on the functional
requirements of the software
• That is, black-box testing enables the software
engineer to derive sets of input conditions
that will fully exercise all functional
requirements for a program
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Tests are designed to answer the
following questions:
• How is functional validity tested?
• How is system behaviour and performance tested?
• What classes of input will make good test cases?
• Is the system particularly sensitive to certain input
values?
• How are the boundaries of a data class isolated?
• What data rates and data volume can the system
tolerate?
• What effect will specific combinations of data have on
system operation?
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Graph-Based Testing Methods
• The first step in black-box testing is to
understand the objects that are modeled in
software and the relationships that connect
these objects
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Equivalence Partitioning
• Equivalence partitioning is a black-box testing method
that divides the input domain of a program into classes
of data from which test cases can be derived
• Equivalence classes may be defined according to the
following guidelines:
– 1. If an input condition specifies a range, one valid and two
invalid equivalence classes are defined
– 2. If an input condition requires a specific value, one valid
and two invalid equivalence classes are defined
– 3. If an input condition specifies a member of a set, one
valid and one invalid equivalence class are defined
– 4. If an input condition is Boolean, one valid and one
invalid class are defined.
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Boundary Value Analysis
• Boundary value analysis leads to a selection of test cases that
exercise bounding values
• 1. If an input condition specifies a range bounded by values a and b,
test cases should be designed with values a and b and just above
and just below a and b.
• 2. If an input condition specifies a number of values, test cases
should be developed that exercise the minimum and maximum
numbers. Values just above and below minimum and maximum are
also tested.
• 3. Apply guidelines 1 and 2 to output conditions. Test cases should
be designed to create an output report that produces the maximum
(and minimum) allowable number of table entries.
• 4. If internal program data structures have prescribed boundaries
(e.g., an array has a defined limit of 100 entries), be certain to
design a test case to exercise the data structure at its boundary
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Comparison Testing
• These independent versions form the basis of a
black-box testing technique called comparison
testing or back-to-back testing
• Comparison testing is not foolproof
• If the specification from which all versions have
been developed is in error, all versions will likely
reflect the error
• In addition, if each of the independent versions
produces identical but incorrect results, condition
testing will fail to detect the error
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
Orthogonal Array Testing
• Orthogonal array testing can be applied to
problems in which the input domain is
relatively small but too large to accommodate
exhaustive testing
• Useful in finding errors associated with region
faults—an error category associated with
faulty logic within a software component
Prepared by, Dr.T.Thendral, Assistant
Professor, SRCW
1 de 48

Recomendados

PROCESS MODELS.ppt por
PROCESS MODELS.pptPROCESS MODELS.ppt
PROCESS MODELS.pptDrTThendralCompSci
393 visualizações38 slides
UNIT TESTING.pptx por
UNIT TESTING.pptxUNIT TESTING.pptx
UNIT TESTING.pptxDrTThendralCompSci
114 visualizações21 slides
Software design and Software engineering.pptx por
Software design and Software engineering.pptxSoftware design and Software engineering.pptx
Software design and Software engineering.pptxDrTThendralCompSci
105 visualizações36 slides
Software design and Software engineering.pptx por
Software design and Software engineering.pptxSoftware design and Software engineering.pptx
Software design and Software engineering.pptxDrTThendralCompSci
253 visualizações31 slides
SOFTWARE QUALITY ASSURANCE.ppt por
SOFTWARE QUALITY ASSURANCE.pptSOFTWARE QUALITY ASSURANCE.ppt
SOFTWARE QUALITY ASSURANCE.pptDrTThendralCompSci
250 visualizações30 slides
EFFECTIVE MODULAR DESIGN.pptx por
EFFECTIVE MODULAR DESIGN.pptxEFFECTIVE MODULAR DESIGN.pptx
EFFECTIVE MODULAR DESIGN.pptxDrTThendralCompSci
309 visualizações23 slides

Mais conteúdo relacionado

Mais procurados

Chapter 2 software process models por
Chapter 2   software process modelsChapter 2   software process models
Chapter 2 software process modelsGolda Margret Sheeba J
2.6K visualizações58 slides
Software design, software engineering por
Software design, software engineeringSoftware design, software engineering
Software design, software engineeringRupesh Vaishnav
5.1K visualizações69 slides
Software Engineering por
Software EngineeringSoftware Engineering
Software EngineeringUMA PARAMESWARI
845 visualizações51 slides
Chapter 13 software testing strategies por
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategiesSHREEHARI WADAWADAGI
12.5K visualizações45 slides
System testing por
System testingSystem testing
System testingKarthigaGunasekaran1
344 visualizações15 slides
Spm tutorials por
Spm tutorialsSpm tutorials
Spm tutorialsVinod Kumar
15.4K visualizações33 slides

Mais procurados(20)

Chapter 2 software process models por Golda Margret Sheeba J
Chapter 2   software process modelsChapter 2   software process models
Chapter 2 software process models
Golda Margret Sheeba J2.6K visualizações
Software design, software engineering por Rupesh Vaishnav
Software design, software engineeringSoftware design, software engineering
Software design, software engineering
Rupesh Vaishnav5.1K visualizações
Software Engineering por UMA PARAMESWARI
Software EngineeringSoftware Engineering
Software Engineering
UMA PARAMESWARI845 visualizações
Chapter 13 software testing strategies por SHREEHARI WADAWADAGI
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
SHREEHARI WADAWADAGI12.5K visualizações
Spm tutorials por Vinod Kumar
Spm tutorialsSpm tutorials
Spm tutorials
Vinod Kumar15.4K visualizações
REQUIREMENT ENGINEERING por Saqib Raza
REQUIREMENT ENGINEERINGREQUIREMENT ENGINEERING
REQUIREMENT ENGINEERING
Saqib Raza13.6K visualizações
Fundamental design concepts por srijavel
Fundamental design conceptsFundamental design concepts
Fundamental design concepts
srijavel29.1K visualizações
Software Metrics - Software Engineering por Drishti Bhalla
Software Metrics - Software EngineeringSoftware Metrics - Software Engineering
Software Metrics - Software Engineering
Drishti Bhalla6.4K visualizações
Design Concepts in Software Engineering-1.pptx por KarthigaiSelviS3
Design Concepts in Software Engineering-1.pptxDesign Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptx
KarthigaiSelviS31.3K visualizações
5. Métodos de Prueba de Software por Mario A Moreno Rocha
5. Métodos de Prueba de Software5. Métodos de Prueba de Software
5. Métodos de Prueba de Software
Mario A Moreno Rocha10.9K visualizações
Structured system analysis por learnt
Structured system analysisStructured system analysis
Structured system analysis
learnt7K visualizações
Software Engineering (Project Scheduling) por ShudipPal
Software Engineering (Project Scheduling)Software Engineering (Project Scheduling)
Software Engineering (Project Scheduling)
ShudipPal6.2K visualizações
software cost factor por Abinaya B
software cost factorsoftware cost factor
software cost factor
Abinaya B30K visualizações
Lecture4 requirement engineering por Shahid Riaz
Lecture4 requirement engineeringLecture4 requirement engineering
Lecture4 requirement engineering
Shahid Riaz3.8K visualizações
Estimating Software Maintenance Costs por lalithambiga kamaraj
Estimating Software Maintenance CostsEstimating Software Maintenance Costs
Estimating Software Maintenance Costs
lalithambiga kamaraj10.3K visualizações
Global Software Development powered by Perforce por Perforce
Global Software Development powered by PerforceGlobal Software Development powered by Perforce
Global Software Development powered by Perforce
Perforce1.1K visualizações
Software Engineering por Zahoorali Khan
Software EngineeringSoftware Engineering
Software Engineering
Zahoorali Khan5.2K visualizações
Software project estimation por inayat khan
Software project estimationSoftware project estimation
Software project estimation
inayat khan949 visualizações

Similar a SOFTWARE TESTING.pptx

Software testing & its technology por
Software testing & its technologySoftware testing & its technology
Software testing & its technologyHasam Panezai
1.5K visualizações32 slides
Chapter 8 Testing Tactics.ppt por
Chapter 8 Testing Tactics.pptChapter 8 Testing Tactics.ppt
Chapter 8 Testing Tactics.pptVijayaPratapReddyM
17 visualizações44 slides
L software testing por
L   software testingL   software testing
L software testingFáber D. Giraldo
1K visualizações33 slides
Class9_SW_Testing_Strategies.pdf por
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfFarjanaParvin5
15 visualizações62 slides
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat... por
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...ShudipPal
158 visualizações29 slides
Software engineering Testing technique,test case,test suit design por
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designMaitree Patel
377 visualizações18 slides

Similar a SOFTWARE TESTING.pptx(20)

Software testing & its technology por Hasam Panezai
Software testing & its technologySoftware testing & its technology
Software testing & its technology
Hasam Panezai1.5K visualizações
Chapter 8 Testing Tactics.ppt por VijayaPratapReddyM
Chapter 8 Testing Tactics.pptChapter 8 Testing Tactics.ppt
Chapter 8 Testing Tactics.ppt
VijayaPratapReddyM17 visualizações
L software testing por Fáber D. Giraldo
L   software testingL   software testing
L software testing
Fáber D. Giraldo1K visualizações
Class9_SW_Testing_Strategies.pdf por FarjanaParvin5
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdf
FarjanaParvin515 visualizações
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat... por ShudipPal
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
ShudipPal158 visualizações
Software engineering Testing technique,test case,test suit design por Maitree Patel
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit design
Maitree Patel377 visualizações
SE UNIT 5 part 2 (1).pptx por PraneethBhai1
SE UNIT 5 part 2 (1).pptxSE UNIT 5 part 2 (1).pptx
SE UNIT 5 part 2 (1).pptx
PraneethBhai13 visualizações
Lecture 21 por Skillspire LLC
Lecture 21Lecture 21
Lecture 21
Skillspire LLC64 visualizações
Manual Testing Interview Questions & Answers.docx por ssuser305f65
Manual Testing Interview Questions & Answers.docxManual Testing Interview Questions & Answers.docx
Manual Testing Interview Questions & Answers.docx
ssuser305f6510 visualizações
Testing por trashqwerty
TestingTesting
Testing
trashqwerty432 visualizações
Software Testing- Principles of testing- Mazenet Solution por Mazenetsolution
Software Testing- Principles of testing- Mazenet SolutionSoftware Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet Solution
Mazenetsolution367 visualizações
ST-All about Test Case-p3 por Prachi Sasankar
ST-All about Test Case-p3ST-All about Test Case-p3
ST-All about Test Case-p3
Prachi Sasankar831 visualizações
St all about test case-p3 por Prachi Sasankar
St all about test case-p3St all about test case-p3
St all about test case-p3
Prachi Sasankar108 visualizações
An introduction to Software Testing and Test Management por Anuraj S.L
An introduction to Software Testing and Test ManagementAn introduction to Software Testing and Test Management
An introduction to Software Testing and Test Management
Anuraj S.L2.4K visualizações
Test planning & estimation por Leslie Smart
Test planning & estimationTest planning & estimation
Test planning & estimation
Leslie Smart2.8K visualizações
Software Testing Strategies por Alpana Bhaskar
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
Alpana Bhaskar623 visualizações
Joseph G Scott por Joe Scott
Joseph G  ScottJoseph G  Scott
Joseph G Scott
Joe Scott281 visualizações
Fundamentals of software 2 | Test Case | Test Suite | Test Plan | Test Scenario por Siddharth Sharma
Fundamentals of software 2 | Test Case | Test Suite | Test Plan | Test ScenarioFundamentals of software 2 | Test Case | Test Suite | Test Plan | Test Scenario
Fundamentals of software 2 | Test Case | Test Suite | Test Plan | Test Scenario
Siddharth Sharma110 visualizações
testing por Rashmi Deoli
testingtesting
testing
Rashmi Deoli3.4K visualizações
Week 14 Unit Testing.pptx por mianshafa
Week 14  Unit Testing.pptxWeek 14  Unit Testing.pptx
Week 14 Unit Testing.pptx
mianshafa27 visualizações

Mais de DrTThendralCompSci

The Application Layer.ppt por
The Application Layer.pptThe Application Layer.ppt
The Application Layer.pptDrTThendralCompSci
99 visualizações35 slides
Transport Layer.pptx por
Transport Layer.pptxTransport Layer.pptx
Transport Layer.pptxDrTThendralCompSci
76 visualizações28 slides
Software Configuration Management.ppt por
Software Configuration Management.pptSoftware Configuration Management.ppt
Software Configuration Management.pptDrTThendralCompSci
12 visualizações23 slides
Wireless LANs PPT.ppt por
Wireless LANs PPT.pptWireless LANs PPT.ppt
Wireless LANs PPT.pptDrTThendralCompSci
102 visualizações37 slides
NETWORK LAYER.ppt por
NETWORK LAYER.pptNETWORK LAYER.ppt
NETWORK LAYER.pptDrTThendralCompSci
189 visualizações35 slides
Bluetooth.ppt por
Bluetooth.pptBluetooth.ppt
Bluetooth.pptDrTThendralCompSci
108 visualizações32 slides

Mais de DrTThendralCompSci(14)

The Application Layer.ppt por DrTThendralCompSci
The Application Layer.pptThe Application Layer.ppt
The Application Layer.ppt
DrTThendralCompSci99 visualizações
Transport Layer.pptx por DrTThendralCompSci
Transport Layer.pptxTransport Layer.pptx
Transport Layer.pptx
DrTThendralCompSci76 visualizações
Software Configuration Management.ppt por DrTThendralCompSci
Software Configuration Management.pptSoftware Configuration Management.ppt
Software Configuration Management.ppt
DrTThendralCompSci12 visualizações
Wireless LANs PPT.ppt por DrTThendralCompSci
Wireless LANs PPT.pptWireless LANs PPT.ppt
Wireless LANs PPT.ppt
DrTThendralCompSci102 visualizações
NETWORK LAYER.ppt por DrTThendralCompSci
NETWORK LAYER.pptNETWORK LAYER.ppt
NETWORK LAYER.ppt
DrTThendralCompSci189 visualizações
MEDIUM-ACCESS CONTROL SUB LAYER.ppt por DrTThendralCompSci
MEDIUM-ACCESS CONTROL SUB LAYER.pptMEDIUM-ACCESS CONTROL SUB LAYER.ppt
MEDIUM-ACCESS CONTROL SUB LAYER.ppt
DrTThendralCompSci155 visualizações
DATA-LINK LAYER.ppt por DrTThendralCompSci
DATA-LINK LAYER.pptDATA-LINK LAYER.ppt
DATA-LINK LAYER.ppt
DrTThendralCompSci348 visualizações
Software prototyping.pptx por DrTThendralCompSci
Software prototyping.pptxSoftware prototyping.pptx
Software prototyping.pptx
DrTThendralCompSci148 visualizações
Requirement Engineering.ppt por DrTThendralCompSci
Requirement Engineering.pptRequirement Engineering.ppt
Requirement Engineering.ppt
DrTThendralCompSci130 visualizações
PHYSICAL LAYER.ppt por DrTThendralCompSci
PHYSICAL LAYER.pptPHYSICAL LAYER.ppt
PHYSICAL LAYER.ppt
DrTThendralCompSci302 visualizações
COMPUTER NETWORK por DrTThendralCompSci
COMPUTER NETWORKCOMPUTER NETWORK
COMPUTER NETWORK
DrTThendralCompSci242 visualizações

Último

ICS3211_lecture 09_2023.pdf por
ICS3211_lecture 09_2023.pdfICS3211_lecture 09_2023.pdf
ICS3211_lecture 09_2023.pdfVanessa Camilleri
115 visualizações10 slides
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptx por
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptxCollective Bargaining and Understanding a Teacher Contract(16793704.1).pptx
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptxCenter for Integrated Training & Education
95 visualizações57 slides
S1_SD_Resources Walkthrough.pptx por
S1_SD_Resources Walkthrough.pptxS1_SD_Resources Walkthrough.pptx
S1_SD_Resources Walkthrough.pptxLAZAROAREVALO1
64 visualizações57 slides
Monthly Information Session for MV Asterix (November) por
Monthly Information Session for MV Asterix (November)Monthly Information Session for MV Asterix (November)
Monthly Information Session for MV Asterix (November)Esquimalt MFRC
72 visualizações26 slides
Dance KS5 Breakdown por
Dance KS5 BreakdownDance KS5 Breakdown
Dance KS5 BreakdownWestHatch
99 visualizações2 slides
Women from Hackney’s History: Stoke Newington by Sue Doe por
Women from Hackney’s History: Stoke Newington by Sue DoeWomen from Hackney’s History: Stoke Newington by Sue Doe
Women from Hackney’s History: Stoke Newington by Sue DoeHistory of Stoke Newington
163 visualizações21 slides

Último(20)

ICS3211_lecture 09_2023.pdf por Vanessa Camilleri
ICS3211_lecture 09_2023.pdfICS3211_lecture 09_2023.pdf
ICS3211_lecture 09_2023.pdf
Vanessa Camilleri115 visualizações
S1_SD_Resources Walkthrough.pptx por LAZAROAREVALO1
S1_SD_Resources Walkthrough.pptxS1_SD_Resources Walkthrough.pptx
S1_SD_Resources Walkthrough.pptx
LAZAROAREVALO164 visualizações
Monthly Information Session for MV Asterix (November) por Esquimalt MFRC
Monthly Information Session for MV Asterix (November)Monthly Information Session for MV Asterix (November)
Monthly Information Session for MV Asterix (November)
Esquimalt MFRC72 visualizações
Dance KS5 Breakdown por WestHatch
Dance KS5 BreakdownDance KS5 Breakdown
Dance KS5 Breakdown
WestHatch99 visualizações
Women from Hackney’s History: Stoke Newington by Sue Doe por History of Stoke Newington
Women from Hackney’s History: Stoke Newington by Sue DoeWomen from Hackney’s History: Stoke Newington by Sue Doe
Women from Hackney’s History: Stoke Newington by Sue Doe
History of Stoke Newington163 visualizações
Structure and Functions of Cell.pdf por Nithya Murugan
Structure and Functions of Cell.pdfStructure and Functions of Cell.pdf
Structure and Functions of Cell.pdf
Nithya Murugan719 visualizações
Education and Diversity.pptx por DrHafizKosar
Education and Diversity.pptxEducation and Diversity.pptx
Education and Diversity.pptx
DrHafizKosar193 visualizações
CUNY IT Picciano.pptx por apicciano
CUNY IT Picciano.pptxCUNY IT Picciano.pptx
CUNY IT Picciano.pptx
apicciano54 visualizações
Psychology KS5 por WestHatch
Psychology KS5Psychology KS5
Psychology KS5
WestHatch119 visualizações
Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant... por Ms. Pooja Bhandare
Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant...Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant...
Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant...
Ms. Pooja Bhandare133 visualizações
Create a Structure in VBNet.pptx por Breach_P
Create a Structure in VBNet.pptxCreate a Structure in VBNet.pptx
Create a Structure in VBNet.pptx
Breach_P78 visualizações
Ch. 7 Political Participation and Elections.pptx por Rommel Regala
Ch. 7 Political Participation and Elections.pptxCh. 7 Political Participation and Elections.pptx
Ch. 7 Political Participation and Elections.pptx
Rommel Regala111 visualizações
AUDIENCE - BANDURA.pptx por iammrhaywood
AUDIENCE - BANDURA.pptxAUDIENCE - BANDURA.pptx
AUDIENCE - BANDURA.pptx
iammrhaywood117 visualizações
Class 9 lesson plans por TARIQ KHAN
Class 9 lesson plansClass 9 lesson plans
Class 9 lesson plans
TARIQ KHAN51 visualizações
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx por ISSIP
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxEIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
ISSIP386 visualizações
The basics - information, data, technology and systems.pdf por JonathanCovena1
The basics - information, data, technology and systems.pdfThe basics - information, data, technology and systems.pdf
The basics - information, data, technology and systems.pdf
JonathanCovena1146 visualizações
The Accursed House by Émile Gaboriau por DivyaSheta
The Accursed House  by Émile GaboriauThe Accursed House  by Émile Gaboriau
The Accursed House by Émile Gaboriau
DivyaSheta223 visualizações

SOFTWARE TESTING.pptx

  • 1. SOFTWARE TESTING UNIT III Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 2. OBJECTIVE • What is Software Testing? • Software testing fundamentals • Test Case Design Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 3. • Software testing is a critical element of software quality assurance and represents the ultimate review of specification, design, and code generation • e.g., flight control, nuclear reactor monitoring • Software testing fundamentals define the overriding objectives for software testing • Test case design focuses on a set of techniques for the creation of test cases that meet overall testing objectives Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 4. SOFTWARE TESTING FUNDAMENTALS • The engineer creates a series of test cases that are intended to "demolish" the software that has been built • software process that could be viewed (psychologically, at least) as destructive rather than constructive • Myth-we were really good at programming • There would be no bugs to catch Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 5. Testing Objectives • 1. Process of executing a program with the intent of finding an error • 2. A good test case - finding an as-yet undiscovered error • 3. A successful test is one that uncovers an as- yet-undiscovered error Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 6. Testing Principles • Software engineer must understand the basic principles that guide software testing • All tests should be traceable to customer requirements • Tests should be planned long before testing begins • The Pareto principle applies to software testing(80/20%) • Testing should begin “in the small” and progress toward testing “in the large” • Exhaustive testing is not possible • To be most effective, testing should be conducted by an independent third party Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 7. Testability • Software testability is simply how easily can be tested • Metrics that could be used to measure testability in most of its aspects Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 8. Operability • "The better it works, the more efficiently it can be tested“ • The system has few bugs (bugs add analysis and reporting overhead to the test process) • No bugs block the execution of tests • The product evolves in functional stages (allows simultaneous development) Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 9. Observability • Distinct output is generated for each input • System states and variables are visible or queriable during execution • Past system states and variables are visible or queriable (e.g., transaction logs) • All factors affecting the output are visible • Incorrect output is easily identified • Internal errors are automatically detected through self- testing mechanisms • Internal errors are automatically reported • Source code is accessible Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 10. Controllability • The better control the software, the more the testing can be automated and optimized • All possible outputs can be generated through some combination of input • All code is executable through some combination of input • Software and hardware states and variables can be controlled directly by the test engineer • Input and output formats are consistent and structured • Tests can be conveniently specified, automated, and reproduced. Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 11. Decomposability • "By controlling the scope of testing, we can more quickly isolate problems and perform smarter retesting – The software system is built from independent modules. – Software modules can be tested independently. Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 12. Simplicity • The less there is to test, the more quickly we can test it • Functional simplicity (e.g., the feature set is the minimum necessary to meet requirements • Structural simplicity (e.g., architecture is modularized to limit the propagation of faults). • Code simplicity (e.g., a coding standard is adopted for ease of inspection and maintenance) Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 13. Stability • "The fewer the changes, the fewer the disruptions to testing. – Changes to the software are infrequent – Changes to the software are controlled – Changes to the software do not invalidate existing tests – The software recovers well from failures Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 14. Understandability • The more information we have, the smarter we will test – The design is well understood – Dependencies between internal, external, and shared components are well understood – Changes to the design are communicated – Technical documentation is instantly accessible – Technical documentation is well organized – Technical documentation is specific and detailed Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 15. What are the attributes of a “good” test? • A good test has a high probability of finding an error • A good test is not redundant • A good test should be “best of breed” • A good test should be neither too simple nor too complex Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 16. TEST CASE DESIGN • The design of tests for software and other engineered products can be as challenging as the initial design of the product itself • A rich variety of test case design methods have evolved for software • Any engineered product (and most other things) can be tested in one of two ways Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 17. • Black-box testing - the tester is not concerned with the internal knowledge or Implementation details of the software, but rather focuses on validating the functionality based on the provided specifications or requirements • White-box testing- White box testing is a form of application testing that provides the tester with complete knowledge of the application being tested, including access to source code and design documents Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 18. WHITE-BOX TESTING • White-box testing, sometimes called glass-box testing • The software engineer can derive test cases – guarantee that all independent paths within a module have been exercised at least once – exercise all logical decisions on their true and false sides – execute all loops at their boundaries and within their operational bounds, and – exercise internal data structures to ensure their validity Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 19. • Logic errors and incorrect assumptions are inversely proportional to the probability that a program path will be executed • We often believe that a logical path is not likely to be executed when, in fact, it may be executed on a regular basis • Typographical errors are random – Each of these reasons provides an argument for conducting white-box tests Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 20. BASIS PATH TESTING • Basis path testing is a white-box testing technique first proposed by Tom McCabe • The basis path method enables the test case designer to derive a logical complexity measure of a procedural design • Test cases derived to exercise the basis set are guaranteed to execute every statement in the program at least one time during Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 21. Flow Graph Notation • A simple notation for the representation of control flow, called a flow graph (or program graph • The flow graph depicts logical control flow using the notation illustrated in Figure Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 22. Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 23. • Figure 17.2B maps the flowchart into a corresponding flow graph • A sequence of process boxes and a decision diamond can map into a single node • The arrows on the flow graph, called edges or links, represent flow of control and are analogous to flowchart arrows • Areas bounded by edges and nodes are called regions Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 24. FLOW GRAPH Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 25. A compound condition occurs when one or more Boolean operators (logical OR, AND, NAND, NOR) is present in a conditional statement Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 26. Cyclomatic Complexity • Cyclomatic complexity is a software metric that provides a quantitative measure of the logical complexity of a program • path 1: 1-11 • path 2: 1-2-3-4-5-10-1-11 • path 3: 1-2-3-6-8-9-10-1-11 • path 4: 1-2-3-6-7-9-10-1-11 Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 27. • Cyclomatic complexity has a foundation in graph theory and provides us with an extremely useful software metric • Complexity is computed in one of three ways: – 1. The number of regions of the flow graph correspond to the cyclomatic complexity – 2. Cyclomatic complexity, V(G), for a flow graph, G, is defined as V(G) = E -N + 2 – where E is the number of flow graph edges, N is the number of flow graph nodes. – 3. Cyclomatic complexity, V(G), for a flow graph, G, is also defined as V(G) = P + 1 • where P is the number of predicate nodes contained in the flow graph G Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 28. • The flow graph has four regions. • 2. V(G) = 11 edges 9 nodes + 2 = 4 • 3. V(G) = 3 predicate nodes + 1 = 4 Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 29. Deriving Test Cases • The following steps can be applied to derive the basis set: – Using the design or code as a foundation, draw a corresponding flow graph – Determine the cyclomatic complexity of the resultant flow graph • The cyclomatic complexity, V(G), is determined by applying the algorithms – Determine a basis set of linearly independent paths Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 30. Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 31. • Each test case is executed and compared to expected results • Once all test cases have been completed, the tester can be sure that all statements in the program have been executed at least once Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 32. Graph Matrices • To develop a software tool that assists in basis path testing, a data structure, called a graph matrix, can be quite useful. • A graph matrix is a square matrix whose size (i.e., number of rows and columns) is equal to the number of nodes on the flow graph • Referring to the figure, each node on the flow graph is identified by numbers, while each edge is identified by letters • The graph matrix is nothing more than a tabular representation of a flow graph Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 33. Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 34. Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 35. CONTROL STRUCTURE TESTING • These broaden testing coverage and improve quality of white-box testing • Condition Testing: Condition testing is a test case design method that exercises the logical conditions contained in a program module • A simple condition is a Boolean variable or a relational expression Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 36. • If a condition is incorrect, then at least one component of the condition is incorrect • Types of errors in a condition include the following: • • Boolean operator error (incorrect/missing/extra Boolean operators). • • Boolean variable error • • Boolean parenthesis error • • Relational operator error • • Arithmetic expression error Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 37. Data Flow Testing • The data flow testing method selects test paths of a program according to the locations of definitions and uses of variables in the program • DEF(S) = {X | statement S contains a definition of X} • USE(S) = {X | statement S contains a use of X • Data flow testing strategies are useful for selecting test paths of a program containing nested if and loop statements • To illustrate this, consider the application of DU testing to select test paths for the PDL that follows Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 38. Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 39. Loop Testing • Loop testing is a white-box testing technique that focuses exclusively on the validity of loop constructs. • Four different classes of loops: simple loops, concatenated loops, nested loops, and unstructured loops • Simple loops: – 1. Skip the loop entirely – 2. Only one pass through the loop – 3. Two passes through the loop – 4. m passes through the loop where m < n. 5. n 1, n, n + 1 passes through the loop Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 40. Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 41. BLACK-BOX TESTING • Black-box testing, also called behavioral testing, focuses on the functional requirements of the software • That is, black-box testing enables the software engineer to derive sets of input conditions that will fully exercise all functional requirements for a program Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 42. Tests are designed to answer the following questions: • How is functional validity tested? • How is system behaviour and performance tested? • What classes of input will make good test cases? • Is the system particularly sensitive to certain input values? • How are the boundaries of a data class isolated? • What data rates and data volume can the system tolerate? • What effect will specific combinations of data have on system operation? Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 43. Graph-Based Testing Methods • The first step in black-box testing is to understand the objects that are modeled in software and the relationships that connect these objects Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 44. Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 45. Equivalence Partitioning • Equivalence partitioning is a black-box testing method that divides the input domain of a program into classes of data from which test cases can be derived • Equivalence classes may be defined according to the following guidelines: – 1. If an input condition specifies a range, one valid and two invalid equivalence classes are defined – 2. If an input condition requires a specific value, one valid and two invalid equivalence classes are defined – 3. If an input condition specifies a member of a set, one valid and one invalid equivalence class are defined – 4. If an input condition is Boolean, one valid and one invalid class are defined. Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 46. Boundary Value Analysis • Boundary value analysis leads to a selection of test cases that exercise bounding values • 1. If an input condition specifies a range bounded by values a and b, test cases should be designed with values a and b and just above and just below a and b. • 2. If an input condition specifies a number of values, test cases should be developed that exercise the minimum and maximum numbers. Values just above and below minimum and maximum are also tested. • 3. Apply guidelines 1 and 2 to output conditions. Test cases should be designed to create an output report that produces the maximum (and minimum) allowable number of table entries. • 4. If internal program data structures have prescribed boundaries (e.g., an array has a defined limit of 100 entries), be certain to design a test case to exercise the data structure at its boundary Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 47. Comparison Testing • These independent versions form the basis of a black-box testing technique called comparison testing or back-to-back testing • Comparison testing is not foolproof • If the specification from which all versions have been developed is in error, all versions will likely reflect the error • In addition, if each of the independent versions produces identical but incorrect results, condition testing will fail to detect the error Prepared by, Dr.T.Thendral, Assistant Professor, SRCW
  • 48. Orthogonal Array Testing • Orthogonal array testing can be applied to problems in which the input domain is relatively small but too large to accommodate exhaustive testing • Useful in finding errors associated with region faults—an error category associated with faulty logic within a software component Prepared by, Dr.T.Thendral, Assistant Professor, SRCW