Академический Документы
Профессиональный Документы
Культура Документы
AND MAINTENANCE
Unit III – Software Testing
and Maintenance
• Software Testing Fundamentals –
Software testing strategies – Black Box
Testing – White Box Testing – System
Testing – Object Orientation Testing –
State-based Testing - Testing Tools –
Test Case Management – Software
Maintenance Organization – Maintenance
Report – Types of Maintenance – Case
Study for Testing Techniques.
Software Testing Fundamentals
Goals of Testing
a) Finding errors
b) Designing good tests that gives a high
probability of finding errors
c) Designing a product having the
“testability” quality in mind
d) Finding maximum number of errors with
minimum test effort
e) Testing is carried out by the developer
along with the ITG(Independent Test
Group)
Software Testing Fundamentals
Static Dynamic
Structural Functional
White Box Black Box
Only Logical Errors Nothing else but functioning
Software Testing Fundamentals
Using a test case
- A test case is a set of variables under
which a tester will determine whether a
software if working correctly or not.
- Generating the right blend of test cases
that enable the application to work
defect-free should be met.
Software Testing Fundamentals
Test data
Tests Derives
Component Test
code outputs
Software Testing Strategies
White-box testing techniques
a)Basis path testing
- Testing the logical complexity of all
the different paths from one module
to the other module
Types of Basis path testing
1)Flow Graph Notation or Program
Graph Notation
- Understanding the logical flow of data
from one module to the other
Software Testing Strategies
• Each structured construct has a
corresponding symbol
• A flowchart is used to depict program
control structure
• Flowchart is converted to flow graph
• Condition nodes are called predicate
nodes
• Nodes are statements or objects
• Connections are links or edges.
Software Testing Strategies
2) Independent Program Paths
- An independent path is any path
through the program that introduces
at least one new set of processing
statements or a new condition.
- Discussion on Cyclomatic Complexity
3) Deriving test cases
- Finding out the possible basis sets by
using the following steps
Software Testing Strategies
a) Using the design or code as a
foundation, draw a corresponding flow
graph
b) Determine the cyclomatic complexity of
the resultant flow graph
c) Determine a basis set of linearly
independent paths
D) Prepare test cases that will force
execution of each path in the basis set
Software Testing Strategies
4) Graph Matrices
- A data structure
- A square matrix or order n, where n is
the number of nodes
- A tabular representation of a flow
graph
- Matrix entries corresponds to
connection between nodes
Software Testing Strategies
• If there is a connection, link weight is 1
otherwise 0
Graph Matrix
a
Connected to node
1 2 3 4 5
3
e 1 a
b
d 2
f
5 4 Node
3 d b
g c
4 c f
5 g e
2
Software Testing Strategies
Example of a Graph Matrix
Connection Matrix
Connected to node Connections
1 2 3 4 5
1 1 1-1 = 0
Node
3 1 1 2-1 = 1
4 1 1 2-1 = 1
5 1 1 2-1 = 1
3+1 = 4
Software Testing Strategies
b) Control Structure Testing
- Basis-path testing is one such type of
control structure testing
- Several other variants of testing apart
from basis-path testing is highlighted
here
- Helps the improve the quality of
white-box testing
Software Testing Strategies
a)Condition testing
- Testing each logical condition in a
program module
- Types of condition testing
1) Decision coverage testing
2) Condition coverage testing
3) Multiple condition coverage testing
4) Path coverage testing
Software Testing Strategies
b) Data Flow Testing
- Testing the flow of data(locations of
definition and using variables) from
one module to different module(s).
- Testing the statements that carry
data
- Testing the definitions of variables
and verifying its usage
Software Testing Strategies
c) Loop Testing
- Testing the validity of the looping
constructs
- Three different classes of loops
a) Simple
b) Nested
c) Concatenated &
d) Unstructured
Software Testing Strategies
Loop Testing
Software Testing Strategies
Black-box testing
- Also called as behavioral testing
- Focuses on the functional requirements
of the software
Advantages of black box testing
- Helps in finding errors in the following
areas of software development
a) Incorrect or missing functions
b) Interface errors
Software Testing Strategies
c) Data structures or external database
access
d) Behaviour or performance errors &
e) Initialization and Termination errors
Note :
White-box testing is done at the early
stages where as black-box is done at the
later stages of software development
Software Testing Strategies
What does the black box tests do ?
a) How is the functional validity tested ?
b) How are system behaviour and
performance tested ?
c) What classes of input will make good
test cases ?
d) Is the system particularly sensitive to
certain input values ?
e) How are the boundaries of a data class
isolated ?
Software Testing Strategies
f) What data rates and data volume can
the system tolerate ?
g) What effect will specific combinations of
data have on system operation ?
Software Testing Strategies
Black-box testing techniques
a) Graph-based testing methods
b) Equivalence Partitioning
c) Boundary Value Analysis
d) Orthogonal Array testing
e) Comparison testing
Software Testing Strategies
a)Graph-based testing techniques
- Every application is considered to be a
collection of objects
- Identifying objects and building a
graph(object graph)
- From the object graph, each object
relationship with other objects is
identified
- Writing test cases accordingly to
discover errors
Software Testing Strategies
b) Equivalence Partitioning
- A software testing technique that
divides the input and/or output data of
a software unit into partitions of data
from which test cases can be derived.
- The equivalence partitions are usually
derived from the requirements
specification for input attributes that
influence the processing of the test
object.
- Test cases are designed to cover each
partition at least once.
Software Testing Strategies
System
Outputs
Software Testing Strategies
What can equivalence partitioning do?
- Equivalence partitioning technique
uncovers classes of errors.
-2 5 17
x<1 1 ≤ x ≤ 12 12 < x
Software Testing Strategies
c) Boundary-Value Analysis
• Equivalence partitioning is not a stand
alone method to determine test cases. It
is usually supplemented by boundary
value analysis.
• Boundary value analysis focuses on
values on the edge of an equivalence
partition or at the smallest value on
either side of an edge.
Software Testing Strategies
Equivalence Partitioning with
Boundary Value Analysis
• Taking the same example as before.
• Test cases are supplemented with
boundary values.
-2 1 5 12 17
0 2 11 13
x<1 1 ≤ x ≤ 12 12 < x
Software Testing Strategies
d) Orthogonal Array Testing
- Created by Dr. Genichi Taguchi
- Used to test pair-wise interactions
- A small subset of all possible
combinations
- Consists of factors and levels
- Factors means variables under study
and levels are the different values the
factors can take
Software Testing Strategies
- OA provides a reduced subset of the
total combinations while assuring better
coverage than typical test cases
Sample Program : To find out the largest
of three numbers
• No. of Factors : 3 (a,b,c)
• No. of Levels : 3 (number takes three
values )
• No. of Combinations : 27
• No. of OA combinations : 9
Software Testing Strategies
A B C
1 1 1 3
2 1 2 2
3 Parameters – A,B,C 3 1 3 1
4 2 1 2
3 Values – 1,2,3
5 2 2 1
6 2 3 3
All possible cases 7 3 1 1
involving 3 8 3 2 3
parameters: 9 3 3 2
3*3*3 = 27 cases TABLE1 Sample Array using OA
Total cases = 9 which cover all pair-wise combinations
of the 3 variables.
Software Testing Strategies
e) Comparison testing
- Comparing a software product’s
strengths and weaknesses with other
software
- Primarily used to check the
competitiveness for end users before
releasing it to the market i.e. to
check whether a product can be
marketable or not
Software Testing Strategies
System Testing
• Security Testing
•Attempts to verify that protection mechanisms
built into a system are working properly
• Stress Testing
•Executes a system in a manner that demands
resources in abnormal quantity, frequency or
volume. A product that will work under heavy
load (e.g, on-line banking system) should be
tested under increasing load - much heavier
than expected.
Software Testing Strategies
Performance testing
- Designed to test the run-time performance of
software within the context of an integrated
system
Recovery Testing
- Forces the system to fail in a variety of ways and
verifies that recovery is properly performed
Software Testing Strategies
Software Development Life Cycle
Software Concepts Requirements Analysis Design Coding & Debugging Systems Testing Deployment
Thread Testing
• Bottom Up Testing
Incremental Testing
• Top Down Testing
Recovery
Security
Regression Testing Stress
Performance
Software Testing Strategies
ALPHA TESTING BETA TESTING
1. Performed by developers at Performed by customers at their
the developer site own site
2. Conducted by an independent Conducted by users
test team
3. Not open to the public Open to the public
4. Performed in a virtual Performed in a real-time
environment environment
5. Comes under both categories Only black-box testing
i.e. white-box and black-box
testing
6. Not known by any other name Other wise called as Field testing
Software Testing Strategies
Software Testing Strategies
• Object Orientation Testing
How to test?
class
to be
tested
results
software
engineer test cases Why a loop?
Class Testing Process
Software Testing Strategies
• SYSTEM
– Same as Traditional ones
– Still based on Requirements Specs
• UNIT
– Two Common Structures Used
• Method
• Class
– Same as Traditional software (Drivers and
Stubs)
Software Testing Strategies
System Validation
tests
tests
Software Testing Strategies
CLASS A CLASS C
METHOD METHOD
USES USES
CLASS B
METHOD
Software Testing Strategies
F
OBJECT CLASS A
METHOD
METHOD 1
METHOD 2 E
METHOD
B C D
corrective 21%
perfective 50%
adaptive 25%
preventive 4%
Software Testing Strategies
People in Maintenance
• 1975: 75,000 people (17%)
• 2019: ??
Software Testing Strategies
Steps in improving maintainability
a) Reverse Engineering and Restructuring
b) Refactoring for bad smells
c) Program comprehension
d) Using standard tools that give insight
into the design as well as code structure
(both static as well as dynamic
behaviour)
e) Tools that can track version history
Software Testing Strategies
Come “Reverse Engineering”
Software Testing Strategies
What is test case management ?
• Establish a strong and supportive testing
role.
• Re-visit your strategy and mission every
day.
• Advocate for bugs and testability.
• Maintain three lists:risks, issues, coverage
• Test with your team.
• Continuously report the status and
dynamics of testing.
Software Testing Strategies
Vital activities of Test Case
Management
The following are the vital activities of the
test management process
a) Creating and maintaining
release/project cycle/component
information
b) Creating and maintaining the test
artifacts specific to each release/cycle
that we have i.e. requirements, test
cases etc…
Software Testing Strategies
c) Establishing traceability and coverage
between the test assets
d) Test execution support - Test suite
creation, test execution status capture
etc…
e) Metric collection/report – graph
generation for analysis
f) Bug tracking / Defect Management
Software Testing Strategies
Software Maintenance Organization
- Five factors that drive the difficulty of
delivering software
a) Product
b) Documentation
c) End users
d) Process &
e) Environment
Software Testing Strategies
Important attributes to be
Considered during maintenance
a) Product age
b) Design
c) Language
d) Current failure rate &
e) Staff experience
Software Testing Strategies
Maintenance Organization
An organization looking for maintenance
has to identify the following things with
time
a) Input Vs Output
b) Cycle time
c) Cost/change
d) Schedule
e) Flexibility
f) Quality
Case Study for Testing Techniques