SlideShare a Scribd company logo
Dynamic Testing Techniques
Presented by
E Baskaran
(Testing Trainer)
Dynamic Testing Techniques
1 Principles 2 Lifecycle
4 Dynamic test
techniques
3 Static testing
5 Management 6 Tools
Software Testing
Chapter 4
Contents
What is a testing technique?
Black and White box testing
Black box test techniques
White box test techniques
Error Guessing
Dynamic Testing Techniques
1 2 3
4 5 6
Why dynamic test techniques?
 Exhaustive testing (use of all possible inputs and conditions)
is impractical
 must use a subset of all possible test cases
 must have high probability of detecting faults
 Need thought processes that help us select test cases more
intelligently
 test case design techniques are such thought processes
What is a testing technique?
 a procedure for selecting or designing tests
 based on a structural or functional model of the software
 successful at finding faults
 'best' practice
 a way of deriving good test cases
 a way of objectively measuring a test effort
Testing should be rigorous, thorough and systematicTesting should be rigorous, thorough and systematic
Using techniques makes testing much more effectiveUsing techniques makes testing much more effective
Advantages of techniques
 Different people: similar probability find faults
 gain some independence of thought
 Effective testing: find more faults
 focus attention on specific types of fault
 know you're testing the right thing
 Efficient testing: find faults with less effort
 avoid duplication
 systematic techniques are measurable
Measurement
 Objective assessment of thoroughness of testing (with
respect to use of each technique)
 useful for comparison of one test effort to another
 E.g.
Project A
60% Equivalence
partitions
50% Boundaries
75% Branches
Project B
40% Equivalence
partitions
45% Boundaries
60% Branches
Contents
What is a testing technique?
Black and White box testing
Black box test techniques
White box test techniques
Error Guessing
Dynamic Testing Techniques
1 2 3
4 5 6
Three types of systematic technique
Static (non-execution)
• examination of documentation,
source code listings, etc.
Functional (Black Box)
• based on behaviour /
functionality of software
Structural (White Box)
• based on structure
of software
Some test techniques
StaticStatic DynamicDynamic
StructuralStructural
BehaviouralBehavioural
FunctionalFunctionalNon-functionalNon-functional
ReviewsReviews
WalkthroughsWalkthroughs
Desk-checkingDesk-checking
Data
Flow
Data
Flow
Symbolic
Execution
Symbolic
Execution
Definition
-Use
Definition
-Use
StatementStatement
Branch/DecisionBranch/Decision
Branch ConditionBranch Condition
Branch Condition
Combination
Branch Condition
Combination
LCSAJLCSAJ
ArcsArcs
Equivalence
Partitioning
Equivalence
Partitioning
Boundary
Value Analysis
Boundary
Value Analysis
Cause-Effect GraphingCause-Effect Graphing
RandomRandom
UsabilityUsability
PerformancePerformance
Static AnalysisStatic Analysis
InspectionInspection
Control
Flow
Control
Flow
etc.etc.
etc.etc.
etc.etc.
etc.etc.
etc.etc.
State TransitionState Transition
Black box versus white box?
IntegrationIntegration
ComponentComponent
AcceptanceAcceptance
SystemSystem
Black box appropriate
at all levels but
dominates higher
levels of testing
White box used
predominately
at lower levels
to compliment
black box
Contents
What is a testing technique?
Black and White box testing
Black box test techniques
White box test techniques
Error Guessing
Dynamic Testing Techniques
1 2 3
4 5 6
Black Box test design and
measurement techniques
 Techniques defined in BS 7925-2
 Equivalence partitioning
 Boundary value analysis
 State transition testing
 Cause-effect graphing
 Syntax testing
 Random testing
 Also defines how to specify other techniques
= Yes
= No
Also a measurement
technique?
Equivalence partitioning (EP)
 divide (partition) the inputs, outputs, etc. into areas which are the same
(equivalent)
 assumption: if one value works, all will work
 one from each partition better than all from one
1 100 1010
valid invalidinvalid
Boundary value analysis (BVA)
 faults tend to lurk near boundaries
 good place to look for faults
 test values on both sides of boundaries
1 100 1010
valid invalidinvalid
Example: Loan application
Customer Name
Account number
Loan amount requested
Term of loan
Monthly repayment
Term:
Repayment:
Interest rate:
Total paid back:
6 digits, 1st
non-zero
£500 to £9000
1 to 30 years
Minimum £10
2-64 chars.
Customer name
Number of characters:
2 64 65
invalid valid invalid
1
Conditions Valid
Partitions
Invalid
Partitions
Valid
Boundaries
Invalid
Boundaries
Customer
name
2 to 64 chars
valid chars
< 2 chars
> 64 chars
invalid chars
2 chars
64 chars
1 chars
65 chars
0 chars
Valid characters:
Any
other
A-Z
a-z-’
space
Account number
5 6 7
invalid
valid
invalid
number of digits:
first character:
invalid: zero
valid: non-zero
Conditions Valid
Partitions
Invalid
Partitions
Valid
Boundaries
Invalid
Boundaries
Account
number
6 digits
1st
non-zero
< 6 digits
> 6 digits
1st
digit = 0
non-digit
100000
999999
5 digits
7 digits
0 digits
Loan amount
500 9000 9001
invalid valid invalid
499
Conditions Valid
Partitions
Invalid
Partitions
Valid
Boundaries
Invalid
Boundaries
Loan
amount
500 - 9000 < 500
>9000
0
non-numeric
null
500
9000
499
9001
Condition template
Conditions Valid
Partitions
Tag Invalid
Partitions
Tag Valid
Boundaries
Tag Invalid
Boundaries
Tag
Customer
name
2 - 64 chars
valid chars
V1
V2
< 2 chars
> 64 chars
invalid char
X1
X2
X3
2 chars
64 chars
B1
B2
1 char
65 chars
0 chars
D1
D2
D3
Account
number
6 digits
1st
non-zero
V3
V4
< 6 digits
> 6 digits
1st
digit = 0
non-digit
X4
X5
X6
X7
100000
999999
B3
B4
5 digits
7 digits
0 digits
D4
D5
D6
Loan
amount
500 - 9000 V5 < 500
>9000
0
non-integer
null
X8
X9
X10
X11
X12
500
9000
B5
B6
499
9001
D7
D8
Design test cases
Test
Case
Description Expected Outcome New Tags
Covered
1
2
Name: John Smith
Acc no: 123456
Loan: 2500
Term: 3 years
Name: AB
Acc no: 100000
Loan: 500
Term: 1 year
Term: 3 years
Repayment: 79.86
Interest rate: 10%
Total paid: 2874.96
Term: 1 year
Repayment: 44.80
Interest rate: 7.5%
Total paid: 537.60
V1, V2,
V3, V4,
V5 .....
B1, B3,
B5, .....
Why do both EP and BVA?
 If you do boundaries only, you have covered all the partitions
as well
 technically correct and may be OK if everything works correctly!
 if the test fails, is the whole partition wrong, or is a boundary in
the wrong place - have to test mid-partition anyway
 testing only extremes may not give confidence for typical use
scenarios (especially for users)
 boundaries may be harder (more costly) to set up
Test objectives?
For a thorough approach: VP, IP, VB, IB
Under time pressure, depends on your test objective
- minimal user-confidence: VP only?minimal user-confidence: VP only?
- maximum fault finding: VB first (plus IB?)maximum fault finding: VB first (plus IB?)
Condition Valid
Partition
Tag Invalid
Partition
Tag Valid
Boundary
Tag Invalid
Boundary
Tag
Decision tables
 explore combinations of inputs, situations or events,
 it is very easy to overlook specific combinations of input
 start by expressing the input conditions of interest so that
they are either TRUE or FALSE
– record found
– file exists
– code valid
– policy expired
– account in credit
– due date > current date
Example: student access
A university computer system allows students an allocation
of disc space depending on their projects.
If they have used all their allotted space, they are only
allowed restricted access, i.e. to delete files, not to create
them. This is assuming they have logged on with a valid
username and password.
What are the input and output conditions?What are the input and output conditions?
List the input and output
conditions
• list the ‘output
conditions’ under the
input conditions
Input Conditions
Valid username
Valid password
Account in credit
Output Conditions
Login accepted
Restricted access
• list the ‘input
conditions’ in the first
column of the table
Determine input combinations
 add columns to the table for each unique combination of
input conditions.
 each entry in the table may be either ‘T’ for true, ‘F’ for
false.
Input Conditions
Valid username T T T T F F F F
Valid password T T F F T T F F
Account in credit T F T F T F T F
Rationalise input combinations
 some combinations may be impossible or not of interest
 some combinations may be ‘equivalent’
 use a hyphen to denote “don’t care”
Input Conditions
Valid username F T T T
Valid password - F T T
Account in credit - - F T
Complete the table
 determine the expected output conditions for each combination of input
conditions
Input Conditions
Valid username F T T T
Valid password - F T T
Account in credit - - F T
Output Conditions
Login accepted F F T T
Restricted access - - T F
Determine test case groups
 each column is at least one test case
Input Conditions
Valid username F T T T
Valid password - F T T
Account in credit - - F T
Output Conditions
Login accepted F F T T
Restricted access - - T F
Tags A B C D
Design test cases
 usually one test case for each column but can be none or several
Test Description Expected Outcome Tag
1 Username BrbU Invalid username A
2 Username
usernametoolong
Invalid username A
3 Username BobU
Password abcd
Invalid password B
4 Valid user, no disc
space
Restricted access C
5 Valid user with disc
space
Unrestricted access D
Rationalising outputs
 if outputs or effects are mutually exclusive, I.e. T occurs in
only one place in each column, we can combine them
 for example:
X T F F
Y F T F
Z F F T Output X Y Z
is equivalent to:
Rationalising dangers
 rationalising is based on assumptions
 assumptions may be wrong!
 assumptions should be stated
 assumptions may change over time
 be aware of the dangers
 filling in the full table may find errors which will be missed if
you rationalise
 it is possible to rationalise too far
Extending decision tables
 Entries can be more than just ‘true’ or ‘false’
 completing table needs to be done carefully
 rationalising becomes more important
 E.g.
Code = 1, 2, or 3 1 1 1 1 2 2 2 2 3 3 3 3
Exp.date < now T T F F T T F F T T F F
Class A product T F T F T F T F T F T F
Decision Tables in relation to EP
and BVA
Input value Output value
FALSE
TRUE
Contents
What is a testing technique?
Black and White box testing
Black box test techniques
White box test techniques
Error Guessing
Dynamic Testing Techniques
1 2 3
4 5 6
White Box test design and
measurement techniques
 Techniques defined in BS 7925-2
 Statement testing
 Branch / Decision testing
 Data flow testing
 Branch condition testing
 Branch condition combination testing
 Modified condition decision testing
 LCSAJ testing
 Also defines how to specify other techniques
= Yes
= No
Also a measurement
technique?
Stronger structural
techniques (different
structural elements)
More tests
Using structural coverage
Increasing coverage
Coverage OK?
What's
covered
?
Results OK?
Enough
tests?
Spe
c
Spe
c SoftwareSoftware
Tests
More testsMore testsMore testsMore testsMore testsMore testsMore tests
The test coverage trap
Structure exercised,
insufficient function
Structure exercised,
insufficient function
Function exercised,
insufficient structure
Function exercised,
insufficient structure
better testingbetter testing
% Statement % Decision % Condition
Combination
Structural testedness
Functional
testedness
100% coverage does
not mean 100% tested!
100% coverage does
not mean 100% tested!
Coverage is not
Thoroughness
Coverage is not
Thoroughness
Statement coverage
 percentage of executable statements exercised by a test
suite
number of statements exercised
total number of statements
 example:
 program has 100 statements
 tests exercise 87 statements
 statement coverage = 87%
=
Typical ad hoc testing achieves 60 - 75%Typical ad hoc testing achieves 60 - 75%
Statement coverage
is normally measured
by a software tool.
Statement coverage
is normally measured
by a software tool.
?
Example of statement coverage
Test
case
Input Expected
output
1 7 7
As all 5 statements are ‘covered’ by
this test case, we have achieved
100% statement coverage
read(a)
IF a > 6 THEN
b = a
ENDIF
print b
1
2
3
4
5
Statement
numbers
Decision coverage
(Branch coverage)
 percentage of decision outcomes
exercised by a test suite
number of decisions outcomes exercised
total number of decision outcomes
 example:
 program has 120 decision outcomes
 tests exercise 60 decision outcomes
 decision coverage = 50%
Typical ad hoc testing achieves 40 - 60%Typical ad hoc testing achieves 40 - 60%
=
Decision coverage
is normally measured
by a software tool.
Decision coverage
is normally measured
by a software tool.
True
False
?
Paths through code
? ?
1 2
? ?
1 2 31 2
?
?
1 2 3 4
Paths through code with loops
?
1 2 3 4 5 6 7 8 ….
for as many times as it
is possible to go round
the loop (this can be
unlimited, i.e. infinite)
End
Select
trans...
Yes
Example 1
Wait for card to be inserted
IF card is a valid card THEN
display “Enter PIN number”
IF PIN is valid THEN
select transaction
ELSE (otherwise)
display “PIN invalid”
ELSE (otherwise)
reject card
End
Display
“Enter..
Yes
Valid
PIN?
No
Reject
card
Display
“PIN in..
No
Valid
card?
Wait
Read A
IF A > 0 THEN
IF A = 21 THEN
Print “Key”
ENDIF
ENDIF
IF A > 0 THEN
ENDIF
Print “Key”
IF A = 21 THEN
ENDIF
Example 2
 Cyclomatic complexity: _____
 Minimum tests to achieve:
 Statement coverage: ______
 Branch coverage: _____
3
1
3
Read A
Print
Yes
A=21
Yes
No
End
A>0
No
Read
Example 3
 Cyclomatic complexity: _____
 Minimum tests to achieve:
 Statement coverage: ______
 Branch coverage: _____
Read A
Read B
IF A > 0 THEN
IF B = 0 THEN
Print “No values”
ELSE
Print B
IF A > 21 THEN
Print A
ENDIF
ENDIF
ENDIF
4
2
4
Print
Yes
Print
A>21
No
No
B=0
Print
Yes
Yes
Read
A>0
End
No
Example 4
 Cyclomatic complexity: _____
 Minimum tests to achieve:
 Statement coverage: ______
 Branch coverage: _____
Read A
Read B
IF A < 0 THEN
Print “A negative”
ELSE
Print “A positive”
ENDIF
IF B < 0 THEN
Print “B negative”
ELSE
Print “B positive”
ENDIF
3
2
2
Read
End
Print
No
Print
Yes
B<0
Print
No
Print
Yes
A<0
Note: there
are 4 paths
End
No
Example 5
 Cyclomatic complexity: _____
 Minimum tests to achieve:
 Statement coverage: ______
 Branch coverage: _____
Read A
Read B
IF A < 0 THEN
Print “A negative”
ENDIF
IF B < 0 THEN
Print “B negative”
ENDIF
3
1
2
Read A<0 Print
Yes
No
B<0 Print
Yes
Example 6
 Cyclomatic complexity: _____
 Minimum tests to achieve:
 Statement coverage: ______
 Branch coverage: _____
Read A
IF A < 0 THEN
Print “A negative”
ENDIF
IF A > 0 THEN
Print “A positive”
ENDIF
3
2
2
Read Print
Yes
No
End
No
A>0 Print
Yes
A<0
Contents
What is a testing technique?
Black and White box testing
Black box test techniques
White box test techniques
Error Guessing
Dynamic Testing Techniques
1 2 3
4 5 6
Non-systematic test techniques
 Trial and error / Ad hoc
 Error guessing / Experience-driven
 User Testing
 Unscripted Testing
A testing approach that is only
rigorous, thorough and systematic
is incomplete
A testing approach that is only
rigorous, thorough and systematic
is incomplete
Error-Guessing
 always worth including
 after systematic techniques have been used
 can find some faults that systematic techniques can miss
 a ‘mopping up’ approach
 supplements systematic techniques
Not a good approach to start testing withNot a good approach to start testing with
Error Guessing: deriving test
cases
 Consider:
 past failures
 intuition
 experience
 brain storming
 “What is the craziest thing we can do?”
Summary: Key Points
Test techniques are ‘best practice’: help to find faults
Black Box techniques are based on behaviour
White Box techniques are based on structure
Error Guessing supplements systematic techniques
Dynamic Testing Techniques
1 2 3
4 5 6

More Related Content

What's hot (20)

PPTX
Software Testing Technique in Software Engineering
Ismail Hussain
 
PPTX
Black & White Box testing
Mohamed Zeinelabdeen Abdelgader Farh jber
 
PPTX
Facial Recognition Attendance System (Synopsis).pptx
kakimetu
 
PPT
Automation testing
Biswajit Pratihari
 
PDF
What is Sanity Testing? Edureka
Edureka!
 
PPT
Software Testing Services
Fuad Mak
 
PPTX
Mobile Application Testing by Javed Ansari
Javed Ansari
 
PPT
Software Testing 101
QA Hannah
 
PPT
Automation testing strategy, approach & planning
SivaprasanthRentala1975
 
PPTX
Test Strategy
Zbyszek Mockun
 
PPTX
Software testing
KarnatiChandramoules
 
PPT
Types of testing
Valarmathi Srinivasan
 
PDF
Overcoming challenges of_verifying complex mixed signal designs
Pankaj Singh
 
PDF
Defect life cycle
Bapi Sahoo
 
PPTX
Functional testing vs non functional testing | Difference Between Functional ...
Intellipaat
 
PPTX
Emotion based music player
Nizam Muhammed
 
PPS
Test Process
tokarthik
 
PDF
Testing Services - Software Quality Assurance
CCS Technologies (P) Ltd.
 
PPT
Fingerprint voting system
jannatul haque
 
Software Testing Technique in Software Engineering
Ismail Hussain
 
Facial Recognition Attendance System (Synopsis).pptx
kakimetu
 
Automation testing
Biswajit Pratihari
 
What is Sanity Testing? Edureka
Edureka!
 
Software Testing Services
Fuad Mak
 
Mobile Application Testing by Javed Ansari
Javed Ansari
 
Software Testing 101
QA Hannah
 
Automation testing strategy, approach & planning
SivaprasanthRentala1975
 
Test Strategy
Zbyszek Mockun
 
Software testing
KarnatiChandramoules
 
Types of testing
Valarmathi Srinivasan
 
Overcoming challenges of_verifying complex mixed signal designs
Pankaj Singh
 
Defect life cycle
Bapi Sahoo
 
Functional testing vs non functional testing | Difference Between Functional ...
Intellipaat
 
Emotion based music player
Nizam Muhammed
 
Test Process
tokarthik
 
Testing Services - Software Quality Assurance
CCS Technologies (P) Ltd.
 
Fingerprint voting system
jannatul haque
 

Viewers also liked (9)

DOCX
Software testing solution company
Software Testing company
 
PPTX
Dynamic test plans
Johan Hoberg
 
PPTX
The Core of Testing – Dynamic Testing Process – According to ISO 29119 with...
TEST Huddle
 
PDF
Equivalence partitioning
Sarjana Muda
 
PPTX
Equivalence partinioning and boundary value analysis
niharika5412
 
PPT
What Exactly are the Techniques of Software Verification & Validation
Yogindernath Gupta
 
PDF
Chapter 8 software testing
despicable me
 
PPT
Design Test Case Technique (Equivalence partitioning And Boundary value analy...
Ryan Tran
 
DOCX
Window Desktop Application Testing
Trupti Jethva
 
Software testing solution company
Software Testing company
 
Dynamic test plans
Johan Hoberg
 
The Core of Testing – Dynamic Testing Process – According to ISO 29119 with...
TEST Huddle
 
Equivalence partitioning
Sarjana Muda
 
Equivalence partinioning and boundary value analysis
niharika5412
 
What Exactly are the Techniques of Software Verification & Validation
Yogindernath Gupta
 
Chapter 8 software testing
despicable me
 
Design Test Case Technique (Equivalence partitioning And Boundary value analy...
Ryan Tran
 
Window Desktop Application Testing
Trupti Jethva
 
Ad

Similar to Software Testing-Dynamic testing technique-Mazenet solution (20)

PPT
ISTQB / ISEB Foundation Exam Practice - 4
Yogindernath Gupta
 
PPT
ISTQB, ISEB Lecture Notes- 4
onsoftwaretest
 
PPTX
presentation_testing_1455044600_187410.pptx
sidh18
 
PPTX
CTFL Module 04
Davis Thomas
 
PPTX
Lavenya Testing.pptx
ssuser94400e
 
PPT
blckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ yk
SMayankSharma
 
PPT
Dynamic Testing
Jimi Patel
 
PPTX
SE 09 (test design techs).pptx
ZohairMughal1
 
PPTX
ISTQB Foundation Level – Chapter 4: Test Design Techniques
zubair khan
 
PPT
Steven K Allott - Effective Testing - SoftTest Ireland
David O'Dowd
 
PPT
Blackbox
Oana Feidi
 
PPTX
Test Case Design Techniques Presentation.pptx
ksp1mech
 
PPTX
Specification based or black box techniques
Yoga Pratama Putra
 
PPTX
Test design
Nataly Chill
 
PPTX
Test Case Design Techniques – Practical Examples & Best Practices in Software...
Muhammad Fahad Bashir
 
PPTX
Test case techniques
Pina Parmar
 
PPTX
Test design techniques
Mohamed Elshenawy
 
PPT
Testcase design techniques final
shraavank
 
PPTX
5 black box and grey box testing
Yisal Khan
 
PPTX
Black Box Testing
Srikanth Vuriti
 
ISTQB / ISEB Foundation Exam Practice - 4
Yogindernath Gupta
 
ISTQB, ISEB Lecture Notes- 4
onsoftwaretest
 
presentation_testing_1455044600_187410.pptx
sidh18
 
CTFL Module 04
Davis Thomas
 
Lavenya Testing.pptx
ssuser94400e
 
blckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ yk
SMayankSharma
 
Dynamic Testing
Jimi Patel
 
SE 09 (test design techs).pptx
ZohairMughal1
 
ISTQB Foundation Level – Chapter 4: Test Design Techniques
zubair khan
 
Steven K Allott - Effective Testing - SoftTest Ireland
David O'Dowd
 
Blackbox
Oana Feidi
 
Test Case Design Techniques Presentation.pptx
ksp1mech
 
Specification based or black box techniques
Yoga Pratama Putra
 
Test design
Nataly Chill
 
Test Case Design Techniques – Practical Examples & Best Practices in Software...
Muhammad Fahad Bashir
 
Test case techniques
Pina Parmar
 
Test design techniques
Mohamed Elshenawy
 
Testcase design techniques final
shraavank
 
5 black box and grey box testing
Yisal Khan
 
Black Box Testing
Srikanth Vuriti
 
Ad

More from Mazenetsolution (20)

PPTX
Tally Auto E-mail Module | Mazenet Technologies
Mazenetsolution
 
PPTX
Tally Auto SMS Module| Mazenet Technologies
Mazenetsolution
 
PPTX
Tally auto synchronization
Mazenetsolution
 
PPTX
Print barcode using voucher- Mazenettechnologies
Mazenetsolution
 
PPTX
Copy user list | Tally | Tally Software | Accounting Software | Mazenet
Mazenetsolution
 
PPTX
Auto synchronization | Tally Software | Mazenet Technologies
Mazenetsolution
 
PPTX
Auto backup | Tally Coimbatore | Tally Software
Mazenetsolution
 
PPTX
Mazenet Technologies-Tally
Mazenetsolution
 
PPTX
Android - Intents - Mazenet Solution
Mazenetsolution
 
PPT
Java - Servlet - Mazenet Solution
Mazenetsolution
 
PPT
Software Testing - Tool support for testing (CAST) - Mazenet Solution
Mazenetsolution
 
PPT
Software Testing - Test management - Mazenet Solution
Mazenetsolution
 
PPTX
Red Hat - LVM - Mazenet Solution
Mazenetsolution
 
PPT
PHP - Introduction to PHP - Mazenet Solution
Mazenetsolution
 
PPT
Static testing techniques
Mazenetsolution
 
PPTX
Java- GUI- Mazenet solution
Mazenetsolution
 
PPT
Oracle- Introduction to Sql commands- Mazenet solution
Mazenetsolution
 
PPTX
Process management in linux
Mazenetsolution
 
PPT
Software Testing- Principles of testing- Mazenet Solution
Mazenetsolution
 
PPTX
Java- JDBC- Mazenet Solution
Mazenetsolution
 
Tally Auto E-mail Module | Mazenet Technologies
Mazenetsolution
 
Tally Auto SMS Module| Mazenet Technologies
Mazenetsolution
 
Tally auto synchronization
Mazenetsolution
 
Print barcode using voucher- Mazenettechnologies
Mazenetsolution
 
Copy user list | Tally | Tally Software | Accounting Software | Mazenet
Mazenetsolution
 
Auto synchronization | Tally Software | Mazenet Technologies
Mazenetsolution
 
Auto backup | Tally Coimbatore | Tally Software
Mazenetsolution
 
Mazenet Technologies-Tally
Mazenetsolution
 
Android - Intents - Mazenet Solution
Mazenetsolution
 
Java - Servlet - Mazenet Solution
Mazenetsolution
 
Software Testing - Tool support for testing (CAST) - Mazenet Solution
Mazenetsolution
 
Software Testing - Test management - Mazenet Solution
Mazenetsolution
 
Red Hat - LVM - Mazenet Solution
Mazenetsolution
 
PHP - Introduction to PHP - Mazenet Solution
Mazenetsolution
 
Static testing techniques
Mazenetsolution
 
Java- GUI- Mazenet solution
Mazenetsolution
 
Oracle- Introduction to Sql commands- Mazenet solution
Mazenetsolution
 
Process management in linux
Mazenetsolution
 
Software Testing- Principles of testing- Mazenet Solution
Mazenetsolution
 
Java- JDBC- Mazenet Solution
Mazenetsolution
 

Recently uploaded (20)

PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPTX
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
Dimensions of Societal Planning in Commonism
StefanMz
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 

Software Testing-Dynamic testing technique-Mazenet solution

  • 1. Dynamic Testing Techniques Presented by E Baskaran (Testing Trainer)
  • 2. Dynamic Testing Techniques 1 Principles 2 Lifecycle 4 Dynamic test techniques 3 Static testing 5 Management 6 Tools Software Testing Chapter 4
  • 3. Contents What is a testing technique? Black and White box testing Black box test techniques White box test techniques Error Guessing Dynamic Testing Techniques 1 2 3 4 5 6
  • 4. Why dynamic test techniques?  Exhaustive testing (use of all possible inputs and conditions) is impractical  must use a subset of all possible test cases  must have high probability of detecting faults  Need thought processes that help us select test cases more intelligently  test case design techniques are such thought processes
  • 5. What is a testing technique?  a procedure for selecting or designing tests  based on a structural or functional model of the software  successful at finding faults  'best' practice  a way of deriving good test cases  a way of objectively measuring a test effort Testing should be rigorous, thorough and systematicTesting should be rigorous, thorough and systematic
  • 6. Using techniques makes testing much more effectiveUsing techniques makes testing much more effective Advantages of techniques  Different people: similar probability find faults  gain some independence of thought  Effective testing: find more faults  focus attention on specific types of fault  know you're testing the right thing  Efficient testing: find faults with less effort  avoid duplication  systematic techniques are measurable
  • 7. Measurement  Objective assessment of thoroughness of testing (with respect to use of each technique)  useful for comparison of one test effort to another  E.g. Project A 60% Equivalence partitions 50% Boundaries 75% Branches Project B 40% Equivalence partitions 45% Boundaries 60% Branches
  • 8. Contents What is a testing technique? Black and White box testing Black box test techniques White box test techniques Error Guessing Dynamic Testing Techniques 1 2 3 4 5 6
  • 9. Three types of systematic technique Static (non-execution) • examination of documentation, source code listings, etc. Functional (Black Box) • based on behaviour / functionality of software Structural (White Box) • based on structure of software
  • 10. Some test techniques StaticStatic DynamicDynamic StructuralStructural BehaviouralBehavioural FunctionalFunctionalNon-functionalNon-functional ReviewsReviews WalkthroughsWalkthroughs Desk-checkingDesk-checking Data Flow Data Flow Symbolic Execution Symbolic Execution Definition -Use Definition -Use StatementStatement Branch/DecisionBranch/Decision Branch ConditionBranch Condition Branch Condition Combination Branch Condition Combination LCSAJLCSAJ ArcsArcs Equivalence Partitioning Equivalence Partitioning Boundary Value Analysis Boundary Value Analysis Cause-Effect GraphingCause-Effect Graphing RandomRandom UsabilityUsability PerformancePerformance Static AnalysisStatic Analysis InspectionInspection Control Flow Control Flow etc.etc. etc.etc. etc.etc. etc.etc. etc.etc. State TransitionState Transition
  • 11. Black box versus white box? IntegrationIntegration ComponentComponent AcceptanceAcceptance SystemSystem Black box appropriate at all levels but dominates higher levels of testing White box used predominately at lower levels to compliment black box
  • 12. Contents What is a testing technique? Black and White box testing Black box test techniques White box test techniques Error Guessing Dynamic Testing Techniques 1 2 3 4 5 6
  • 13. Black Box test design and measurement techniques  Techniques defined in BS 7925-2  Equivalence partitioning  Boundary value analysis  State transition testing  Cause-effect graphing  Syntax testing  Random testing  Also defines how to specify other techniques = Yes = No Also a measurement technique?
  • 14. Equivalence partitioning (EP)  divide (partition) the inputs, outputs, etc. into areas which are the same (equivalent)  assumption: if one value works, all will work  one from each partition better than all from one 1 100 1010 valid invalidinvalid
  • 15. Boundary value analysis (BVA)  faults tend to lurk near boundaries  good place to look for faults  test values on both sides of boundaries 1 100 1010 valid invalidinvalid
  • 16. Example: Loan application Customer Name Account number Loan amount requested Term of loan Monthly repayment Term: Repayment: Interest rate: Total paid back: 6 digits, 1st non-zero £500 to £9000 1 to 30 years Minimum £10 2-64 chars.
  • 17. Customer name Number of characters: 2 64 65 invalid valid invalid 1 Conditions Valid Partitions Invalid Partitions Valid Boundaries Invalid Boundaries Customer name 2 to 64 chars valid chars < 2 chars > 64 chars invalid chars 2 chars 64 chars 1 chars 65 chars 0 chars Valid characters: Any other A-Z a-z-’ space
  • 18. Account number 5 6 7 invalid valid invalid number of digits: first character: invalid: zero valid: non-zero Conditions Valid Partitions Invalid Partitions Valid Boundaries Invalid Boundaries Account number 6 digits 1st non-zero < 6 digits > 6 digits 1st digit = 0 non-digit 100000 999999 5 digits 7 digits 0 digits
  • 19. Loan amount 500 9000 9001 invalid valid invalid 499 Conditions Valid Partitions Invalid Partitions Valid Boundaries Invalid Boundaries Loan amount 500 - 9000 < 500 >9000 0 non-numeric null 500 9000 499 9001
  • 20. Condition template Conditions Valid Partitions Tag Invalid Partitions Tag Valid Boundaries Tag Invalid Boundaries Tag Customer name 2 - 64 chars valid chars V1 V2 < 2 chars > 64 chars invalid char X1 X2 X3 2 chars 64 chars B1 B2 1 char 65 chars 0 chars D1 D2 D3 Account number 6 digits 1st non-zero V3 V4 < 6 digits > 6 digits 1st digit = 0 non-digit X4 X5 X6 X7 100000 999999 B3 B4 5 digits 7 digits 0 digits D4 D5 D6 Loan amount 500 - 9000 V5 < 500 >9000 0 non-integer null X8 X9 X10 X11 X12 500 9000 B5 B6 499 9001 D7 D8
  • 21. Design test cases Test Case Description Expected Outcome New Tags Covered 1 2 Name: John Smith Acc no: 123456 Loan: 2500 Term: 3 years Name: AB Acc no: 100000 Loan: 500 Term: 1 year Term: 3 years Repayment: 79.86 Interest rate: 10% Total paid: 2874.96 Term: 1 year Repayment: 44.80 Interest rate: 7.5% Total paid: 537.60 V1, V2, V3, V4, V5 ..... B1, B3, B5, .....
  • 22. Why do both EP and BVA?  If you do boundaries only, you have covered all the partitions as well  technically correct and may be OK if everything works correctly!  if the test fails, is the whole partition wrong, or is a boundary in the wrong place - have to test mid-partition anyway  testing only extremes may not give confidence for typical use scenarios (especially for users)  boundaries may be harder (more costly) to set up
  • 23. Test objectives? For a thorough approach: VP, IP, VB, IB Under time pressure, depends on your test objective - minimal user-confidence: VP only?minimal user-confidence: VP only? - maximum fault finding: VB first (plus IB?)maximum fault finding: VB first (plus IB?) Condition Valid Partition Tag Invalid Partition Tag Valid Boundary Tag Invalid Boundary Tag
  • 24. Decision tables  explore combinations of inputs, situations or events,  it is very easy to overlook specific combinations of input  start by expressing the input conditions of interest so that they are either TRUE or FALSE – record found – file exists – code valid – policy expired – account in credit – due date > current date
  • 25. Example: student access A university computer system allows students an allocation of disc space depending on their projects. If they have used all their allotted space, they are only allowed restricted access, i.e. to delete files, not to create them. This is assuming they have logged on with a valid username and password. What are the input and output conditions?What are the input and output conditions?
  • 26. List the input and output conditions • list the ‘output conditions’ under the input conditions Input Conditions Valid username Valid password Account in credit Output Conditions Login accepted Restricted access • list the ‘input conditions’ in the first column of the table
  • 27. Determine input combinations  add columns to the table for each unique combination of input conditions.  each entry in the table may be either ‘T’ for true, ‘F’ for false. Input Conditions Valid username T T T T F F F F Valid password T T F F T T F F Account in credit T F T F T F T F
  • 28. Rationalise input combinations  some combinations may be impossible or not of interest  some combinations may be ‘equivalent’  use a hyphen to denote “don’t care” Input Conditions Valid username F T T T Valid password - F T T Account in credit - - F T
  • 29. Complete the table  determine the expected output conditions for each combination of input conditions Input Conditions Valid username F T T T Valid password - F T T Account in credit - - F T Output Conditions Login accepted F F T T Restricted access - - T F
  • 30. Determine test case groups  each column is at least one test case Input Conditions Valid username F T T T Valid password - F T T Account in credit - - F T Output Conditions Login accepted F F T T Restricted access - - T F Tags A B C D
  • 31. Design test cases  usually one test case for each column but can be none or several Test Description Expected Outcome Tag 1 Username BrbU Invalid username A 2 Username usernametoolong Invalid username A 3 Username BobU Password abcd Invalid password B 4 Valid user, no disc space Restricted access C 5 Valid user with disc space Unrestricted access D
  • 32. Rationalising outputs  if outputs or effects are mutually exclusive, I.e. T occurs in only one place in each column, we can combine them  for example: X T F F Y F T F Z F F T Output X Y Z is equivalent to:
  • 33. Rationalising dangers  rationalising is based on assumptions  assumptions may be wrong!  assumptions should be stated  assumptions may change over time  be aware of the dangers  filling in the full table may find errors which will be missed if you rationalise  it is possible to rationalise too far
  • 34. Extending decision tables  Entries can be more than just ‘true’ or ‘false’  completing table needs to be done carefully  rationalising becomes more important  E.g. Code = 1, 2, or 3 1 1 1 1 2 2 2 2 3 3 3 3 Exp.date < now T T F F T T F F T T F F Class A product T F T F T F T F T F T F
  • 35. Decision Tables in relation to EP and BVA Input value Output value FALSE TRUE
  • 36. Contents What is a testing technique? Black and White box testing Black box test techniques White box test techniques Error Guessing Dynamic Testing Techniques 1 2 3 4 5 6
  • 37. White Box test design and measurement techniques  Techniques defined in BS 7925-2  Statement testing  Branch / Decision testing  Data flow testing  Branch condition testing  Branch condition combination testing  Modified condition decision testing  LCSAJ testing  Also defines how to specify other techniques = Yes = No Also a measurement technique?
  • 38. Stronger structural techniques (different structural elements) More tests Using structural coverage Increasing coverage Coverage OK? What's covered ? Results OK? Enough tests? Spe c Spe c SoftwareSoftware Tests More testsMore testsMore testsMore testsMore testsMore testsMore tests
  • 39. The test coverage trap Structure exercised, insufficient function Structure exercised, insufficient function Function exercised, insufficient structure Function exercised, insufficient structure better testingbetter testing % Statement % Decision % Condition Combination Structural testedness Functional testedness 100% coverage does not mean 100% tested! 100% coverage does not mean 100% tested! Coverage is not Thoroughness Coverage is not Thoroughness
  • 40. Statement coverage  percentage of executable statements exercised by a test suite number of statements exercised total number of statements  example:  program has 100 statements  tests exercise 87 statements  statement coverage = 87% = Typical ad hoc testing achieves 60 - 75%Typical ad hoc testing achieves 60 - 75% Statement coverage is normally measured by a software tool. Statement coverage is normally measured by a software tool. ?
  • 41. Example of statement coverage Test case Input Expected output 1 7 7 As all 5 statements are ‘covered’ by this test case, we have achieved 100% statement coverage read(a) IF a > 6 THEN b = a ENDIF print b 1 2 3 4 5 Statement numbers
  • 42. Decision coverage (Branch coverage)  percentage of decision outcomes exercised by a test suite number of decisions outcomes exercised total number of decision outcomes  example:  program has 120 decision outcomes  tests exercise 60 decision outcomes  decision coverage = 50% Typical ad hoc testing achieves 40 - 60%Typical ad hoc testing achieves 40 - 60% = Decision coverage is normally measured by a software tool. Decision coverage is normally measured by a software tool. True False ?
  • 43. Paths through code ? ? 1 2 ? ? 1 2 31 2 ? ? 1 2 3 4
  • 44. Paths through code with loops ? 1 2 3 4 5 6 7 8 …. for as many times as it is possible to go round the loop (this can be unlimited, i.e. infinite)
  • 45. End Select trans... Yes Example 1 Wait for card to be inserted IF card is a valid card THEN display “Enter PIN number” IF PIN is valid THEN select transaction ELSE (otherwise) display “PIN invalid” ELSE (otherwise) reject card End Display “Enter.. Yes Valid PIN? No Reject card Display “PIN in.. No Valid card? Wait
  • 46. Read A IF A > 0 THEN IF A = 21 THEN Print “Key” ENDIF ENDIF IF A > 0 THEN ENDIF Print “Key” IF A = 21 THEN ENDIF Example 2  Cyclomatic complexity: _____  Minimum tests to achieve:  Statement coverage: ______  Branch coverage: _____ 3 1 3 Read A Print Yes A=21 Yes No End A>0 No Read
  • 47. Example 3  Cyclomatic complexity: _____  Minimum tests to achieve:  Statement coverage: ______  Branch coverage: _____ Read A Read B IF A > 0 THEN IF B = 0 THEN Print “No values” ELSE Print B IF A > 21 THEN Print A ENDIF ENDIF ENDIF 4 2 4 Print Yes Print A>21 No No B=0 Print Yes Yes Read A>0 End No
  • 48. Example 4  Cyclomatic complexity: _____  Minimum tests to achieve:  Statement coverage: ______  Branch coverage: _____ Read A Read B IF A < 0 THEN Print “A negative” ELSE Print “A positive” ENDIF IF B < 0 THEN Print “B negative” ELSE Print “B positive” ENDIF 3 2 2 Read End Print No Print Yes B<0 Print No Print Yes A<0 Note: there are 4 paths
  • 49. End No Example 5  Cyclomatic complexity: _____  Minimum tests to achieve:  Statement coverage: ______  Branch coverage: _____ Read A Read B IF A < 0 THEN Print “A negative” ENDIF IF B < 0 THEN Print “B negative” ENDIF 3 1 2 Read A<0 Print Yes No B<0 Print Yes
  • 50. Example 6  Cyclomatic complexity: _____  Minimum tests to achieve:  Statement coverage: ______  Branch coverage: _____ Read A IF A < 0 THEN Print “A negative” ENDIF IF A > 0 THEN Print “A positive” ENDIF 3 2 2 Read Print Yes No End No A>0 Print Yes A<0
  • 51. Contents What is a testing technique? Black and White box testing Black box test techniques White box test techniques Error Guessing Dynamic Testing Techniques 1 2 3 4 5 6
  • 52. Non-systematic test techniques  Trial and error / Ad hoc  Error guessing / Experience-driven  User Testing  Unscripted Testing A testing approach that is only rigorous, thorough and systematic is incomplete A testing approach that is only rigorous, thorough and systematic is incomplete
  • 53. Error-Guessing  always worth including  after systematic techniques have been used  can find some faults that systematic techniques can miss  a ‘mopping up’ approach  supplements systematic techniques Not a good approach to start testing withNot a good approach to start testing with
  • 54. Error Guessing: deriving test cases  Consider:  past failures  intuition  experience  brain storming  “What is the craziest thing we can do?”
  • 55. Summary: Key Points Test techniques are ‘best practice’: help to find faults Black Box techniques are based on behaviour White Box techniques are based on structure Error Guessing supplements systematic techniques Dynamic Testing Techniques 1 2 3 4 5 6