Professional Documents
Culture Documents
#MoreModelsLessTests
More Models,
Model- More
Less Tests
Based Models,
Testing Less
Tests
Large subsets of any program’s execution space are revealing: if a bug exists in any
member of that space and it is executed, an observable failure results.
But, we rarely know exactly which sub-domains are revealing until we test.
Model Driven Development: Taking BDD/ATDD to the Next Level 3
It’s release time.
Do you know where your bugs are?
Other Agile
325
Aerospace 375
Predicted total
925 latent bugs,
Medical 875 500 KLOC Java
2511
IT 2202
• Model-based Testing
– MBT
Model Driven Development: Taking BDD/ATDD to the Next Level 6
Eaten Alive
by the
Testing
Backblob
EATEN ALIVE BY THE TESTING
BACKBLOB
Where does the time go?
Total Sprint 1 Sprint 2 Sprint 3 Sprint 4
Number
of Test
Cases
} Tests/testing for
new features
Existing manual
Available Test Cases not
Dev/Test executed
Time
Existing automated
Test Cases not
maintained
http://www.youtube.com/watch?v=GODDLgM1gKo
Tell Me a Story
TELL ME A STORY
The Chat Server
• Logon
• List active users
• Post a message
• Broadcast message
• Logoff
!!!
Client Client Chat
Endpoint Endpoint Server
GetStatus
GetStatus
Logoff
Logoff
Logoff
*Unit
Components
Test*Unit
Tooling
System
Under Test
• SpecFlow parses
feature file
• Generates
skeleton test
code for each
scenario and step
System Under
GetStatus
Test (SUT)
Logon Logon
Logon
nc++
Logoff GetStatus
List Users
Users: a, b
!!!
Logoff b
Ack Logoff b
!!!
Client Endpoint Client Endpoint Chat Server
Model Driven Development: Taking BDD/ATDD to the Next Level 37
Spec Explorer Demo
• Model-based testing tool
– Microsoft Research
– Used to test all MSFT APIs
– Robust and stable
– Visual Studio “power tool”
• C# code, not cartoons
• Generates standalone
executable test suite
Model Driven Development: Taking BDD/ATDD to the Next Level 38
1. Create Test
Model Actions
• [Rule] tags a
method for
exploration
• Requires defines
a exploration
precondition –
must be true to
explore
• Set options
• Define machines
– Limits Actions used
in an exploration
• Similar to regular
expression
• Composable
• Very powerful!
• Select any
explorable machine
– Explore
– Generate test suite
– Run on-the-fly test
• Not intended to
be maintained
• Re-generate any
time
Model-based Testing
1.4 Days/Requirement 42% Less
Time Per
Traditional Testing Requirement
2.4 Days/Requirement
Model
Adapters
http://www.youtube.com/watch?v=0GEJgR-bX0w
Q&A
#MoreModelsLessTests
rvbinder@sysverif.com