Presented to Dr. Ghazy Assassa Benha University, Shoubra faculty of engineering, Department of computer engineering, Software Engineering course. March 2013 By : Mohamed Mahmoud El-shenawy Test Design Techniques
Presented to Dr. Ghazy Assassa
Benha University, Shoubra faculty of engineering, Department of computer engineering,
Software Engineering course. March 2013
By : Mohamed Mahmoud El-shenawy
Test Design Techniques
A test design technique basically helps us to select a good set of tests from the total number of all possible tests for a given system.
There are two main categories:1. Static technique2. Dynamic techniquei. Specification-based (black-box, also known as
behavioral techniques)ii. Structure-based (white-box or structural
techniques)iii. Experience- based
Categories of test design techniques?
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
Three types of systematic technique
Some test techniquesStaticStatic DynamicDynamic
StructuralStructural
BehaviouralBehavioural
FunctionalFunctionalNon-functionalNon-functional
ReviewsReviews
WalkthroughsWalkthroughs
Desk-checkingDesk-checking
DataFlowDataFlow
SymbolicExecutionSymbolicExecution
Definition-UseDefinition-Use
StatementStatement
Branch/DecisionBranch/Decision
Branch ConditionBranch Condition
Branch ConditionCombinationBranch ConditionCombination
LCSAJLCSAJ
ArcsArcs
EquivalencePartitioningEquivalencePartitioning
BoundaryValue AnalysisBoundaryValue Analysis
Cause-Effect GraphingCause-Effect Graphing
RandomRandom
UsabilityUsability
PerformancePerformance
Static AnalysisStatic AnalysisInspectionInspection
ControlFlowControlFlow
etc.etc.
etc.etc.
etc.etc.
etc.etc.
etc.etc.
State TransitionState Transition
There are four specification-based or black-box technique:
Equivalence partitioningBoundary value analysisDecision tablesState transition testing
Black-box, Specification-based, also known as behavioral testing techniques
divide (partition) the inputs, outputs, etc. into areas which are the same (equivalent)
assumption: if one value works, all will workone from each partition better than all from
one
Equivalence partitioning (EP)
1 100 1010
valid invalidinvalid
Boundary value analysis (BVA)
faults tend to lurk near boundariesgood place to look for faultstest values on both sides of boundaries
1 100 1010
valid invalidinvalid
Example: Loan applicationCustomer Name
Account number
Loan amount requested
Term of loan
Monthly repayment
Term:
Repayment:
Interest rate:
Total paid back:
6 digits, 1stnon-zero£500 to £9000
1 to 30 years
Minimum £10
2-64 chars.
Account number
5 6 7invalid
validinvalid
number of digits:
first character:invalid: zero
valid: non-zero
Conditions ValidPartitions
InvalidPartitions
ValidBoundaries
InvalidBoundaries
Accountnumber
6 digits1st non-zero
< 6 digits> 6 digits1st digit = 0non-digit
100000999999
5 digits7 digits0 digits
If you do boundaries only, you have covered all the partitions as welltechnically 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
Why do both EP and BVA?
explore combinations of inputs, situations or events,
it is very easy to overlook specific combinations of input
Decision tables provide a systematic way of stating complex business rules, which is useful for developers as well as for testers.
they help testers explore the effects of combinations of different inputs and other software states that must correctly implement business rules.
Decision table
If you are a new customer and you want to open a credit card account then there are three conditions first you will get a 15% discount on all your purchases today, second if you are an existing customer and you hold a loyalty card, you get a 10% discount and third if you have a coupon, you can get 20% off today (but it can’t be used with the ‘new customer’ discount). Discount amounts are added, if applicable.
Credit card example:
A state transition model has four basic parts: The states that the software may occupy
(open/closed or funded/insufficient funds); The transitions from one state to another (not
all transitions are allowed); The events that cause a transition (closing a
file or withdrawing money); The actions that result from a transition (an
error message or being given your cash).
State transition
Figure 4.2 below, shows an example of entering a Personal Identity Number (PIN) to a bank account.
PIN Example