Feb 09, 2016
The Big ThreeWhat are the three most common
complaints we hear about testing?
Problem 1• Missing or incomplete requirements
• Why? legacy application: cannot find the old
documentation Modified application: original requirements not
kept up to date.
• Impact? Difficult to maintain Difficult to test
Solution 1• Behavioral Modeling creates a
communication vehicle between the business and test engineers.
• Result: Common understanding of the application Reverse engineered requirements Easier to maintain and modify
Problem 2• Testing takes too long!
• Why? Too many test cases Redundant tests
• Impact? Cost of testing is too high Applications delayed into production
Solution 2• Behavior Modeling identifies the minimum
necessary number of test cases.
• In case studies, the number of test cases reduced by 75 to 90%
• Result: Less testing Less delay Less cost
Problem 3• Testing can miss bugs!
• Why? Test Suites are missing some functional
paths or conditions
• Impact? Defects deployed to production Costs to repair MUCH higher
Solution 3• Behavioral Modeling identifies all the
functional paths of an application.
• Result: Test suite will not miss any bugs Fewer production problems Less cost
Behavioral Modeling: What is it?
• A graphical representation…• ...of the functional behavior…• …of the software article.
What does it buy us?
• Allows the behavior to be specified at any level of detail.
• Allows different people to work on different sections at the same time.
• Limited “vocabulary” enforces a high level of consistency in the models.
• Allows understanding (and review) by people with a wide variety of experience.
VocabularyBeginning or End Process
Choice Case
Result Displayed Result
Manual Action Representative Sample
Curved Line Connector
Note
Straight Line Connector
How do we do it?
• What does it do?– “Do” in the active sense
• What influences it?
There are only two questions --
Sample Problem 1• Externals only• Example –
Bigger:
Two numbers inOne number out
+1 if 1st number bigger than 2nd
-1 if 1st number smaller than 2nd
0 if the numbers are equal
Bigger
1st Number
result =+1 result = 0 result = -1
bigger than 2nd
equals 2nd
less than 2nd
End
Bigger
1st Number
bigger than 2nd
equals 2nd
less than 2nd
End
2 values input
no1st number
valid
no
2nd number valid
no
yes
yes
yes
result =+1 result = 0 result =-1
UNSPECIFIED!!
Sample Problem 2• FAST
– The Functionally Advanced Sidewalk Teller• Deposit• Withdraw• Transfer• Check Balance
FAST
Deposit Withdraw Transfer Balance
End
FAST
Deposit Withdraw Transfer Balance
End
Signon
FAST
Deposit Withdraw Transfer Balance
End
Signon Exceptions
FAST
Deposit
WithdrawTransfer
Balance
End
Sign On ExceptionsString
FAST
Deposit
Withdraw
Transfer
Balance
End
Sign On
Exceptions
String
Sign-on
End
Valid FASTcard
"This is not aFAST card."
Card returned
No
Account(s) stillopen
Yes
"This card is nolonger valid."
Card retained byFAST
No
User signed on.Main menudisplayed.
Yes
From FAST
Deposit
Exists Exists
"Requested Account Does Not Exist. Re-
enter"
Checking Savings
No No
YesYes
End
Account Updated
To account
From FAST
Deposit
Exists
"Requested Account Does Not Exist. Re-enter or exit"
Checking Savings
No
yes
Yes
End
To account
Account Updated
continue
no
From FAST
Withdraw
Exists
"Requested Account Does Not Exist. Re-
enter"
No
yes
Yes
Yes
End
Enough in account
"Insufficient Funds in
account. Re-enter or quit"
No
yes
Enough in FAST
"Insufficient Funds in
FAST. Reenter or quit" No
yes
Yes
yes
Money dispensed and
account Updated
Amount entered
continue
no
continue
no
From FAST
continue
no
No
Checking Savings
To account
Transfer
From account
Exists
Checking Savings
"From account does
not exist
no
To account
Exists
Checking Savings
"To account does not exist
no
yes
same as from
"To and From accounts cannot
be the same. Reenter or quit."
yes
yes
no
enougn in account
yes "Insufficient funds in ‘From’
account. Reenter or quit."
no
yes
money transferred and
accounts updated.
yes
End
continue
no
Amount entered
continue
no
From FAST
Balance
End
account
exists
Checking Savings
Balance displayed
yes no
"Requested account does
not exist."
From FAST
Exceptions
End
"This machine is temporarily
out of service."
Out of paper
FAST out of cashCancel
Transaction canceled.
Display returns to main menu.
during balance during
deposit during sign-on
duringtransfer
duringwithdraw
From FAST
balance
deposit
withdraw
String
End
deposit
withdraw
balance
Everything is lovely
From FAST
signon signon
• Issues?• Questions?• Comments?• Concerns?
– On anything we have covered so far
Attributes of Good Test Suites• Effective • Efficient
Deposit
Exists
"Requested Account Does Not Exist. Re-enter or exit"
Checking Savings
No
yes
Yes
End
To account
Account Updated
continue
no
From FAST
Deposit
Exists
"Requested Account Does Not Exist. Re-enter or exit"
Checking Savings
No
yes
Yes
End
To account
Account Updated
continue
no
From FAST
Deposit
Exists
"Requested Account Does Not Exist. Re-enter or exit"
Checking Savings
No
yes
Yes
End
To account
Account Updated
continue
no
From FAST
Deposit
Exists
"Requested Account Does Not Exist. Re-enter or exit"
Checking Savings
No
yes
Yes
End
To account
Account Updated
continue
no
From FAST
1st pass
1st pass
Next Steps
• Test Design Review
• Test Case Design
TCD ID:Description:
Author: Original Release: Date:
Test Case:Control Points:
Expected Results
Test Case Design Template
Test Case Design SampleTCD ID: FD
Description: FAST DepositAuthor: Shel Prince
Original Release: 1.0 Date: 9/6/20xx
Test case: FD01 FD02 FD03Control Points:To Account: * * *
Checking * * *Savings *
Account exists? Y N N/YContinue: * * *
yes * *no *
FAS
T ex
it; c
ard
is r
etur
ned.
Afte
r th
e ac
coun
t cho
ice
is
corr
ecte
d, th
e ac
coun
t bal
ance
is
upda
ted
with
the
depo
site
d am
ount
.
Expected Results
Acco
unt b
alan
ce u
pdat
ed w
ith th
e de
posi
ted
amou
nt.
Msg: "requested account does not exist. Reenter
or Quit."
Test Case Specification– Test Case ID– Test Items– Input– Expected Output– Environmental Needs– Special Procedural Requirements– Inter-test case Dependencies– Actual Steps…
• Issues?• Questions?• Comments?• Concerns?