Upload
korey-nickle
View
220
Download
2
Tags:
Embed Size (px)
Citation preview
• Unit Of Work• Setup Methods
• Constrained vs. Unconstrained Isolation
Frameworks• Principles of Good Isolation Frameworks
• Faking Deep Legacy is OK• Six Influence Forces
• Beautiful Builds
Unit
Of
Work
Production Code
Unit Of Work
Return Value/Exceptio
n
Noticeable State Change
3rd Party call
Public API
Test
Nam
ing b
y U
nit
O
f W
ork
UnitOfWork_Input_Expect
edOutput
UnitOfWork_LogicalAction
_ExpectedChangeInBeha
vior
UnitOfWork_ActionOrInpu
t_ExepectedCallToThirdPa
rty
Nam
ing b
y U
nit
O
f W
ork
Addition_PositiveNumbers
_ReturnsSum() Addition_WhenCalled_Res
etsTheNextSum() Addition_NegativeNumber
s_CallsLogger()
Isola
tion
fram
ew
ork
s Fu
ture
s
Usability Readability Good Errors Simplicity Robust future proof tests Less over specification
Non strict Recursive Fakes
6 in
fluence
fo
rces
Personal Ability Motivation Social Ability Motivation Environmental Ability Motivation
Tools
Pex – yes Moles (ms fakes) – NO
JustMock - Maybe Nuget – YES Chocolatey – YES
TeamCity – YES FinalBuilder – YES Ruby and Rake – Maybe
Amazon AWS agent hosting –
YES Git for very small commits -
YES
Build
Scr
ipt
Inje
ctio
n Allow version aware builds Build scripts are part
of source control Build configurations on
the CI server are dumb
triggers
Extract Script
Shipping Skeleton
Fill in the blanks
Cumulative Builds
Build Waves
Location Agnostic
BeautifulBuilds.com
Cours
es
I’m
D
oin
g
Beautiful builds TDD with JS TDD with Ruby Art of Unit Testing in .NET from scratch [email protected]
Norway & Sweden Osherove.com for info
It’s
late
in t
he
eve
nin
g
I’m wondering what words to say It’s so hard to breath
here The customer’s face is
gray
I check in the
changes
The code doesn’t even
compile
I wish I was home now
Instead I fake a big smile
It’s time to go
home now
And I’ve got an aching
head
So I lock my computer
And pray that tomorrow
I’m dead
Thank
you!
Beautiful builds TDD with JS TDD with Ruby Art of Unit Testing in .NET from scratch [email protected]
@RoyOsherove Norway & Sweden