unit testing sharepoint applications
DESCRIPTION
Presented at the SharePoint Israeli user group, June 2010TRANSCRIPT
UNIT TESTING SHAREPOINT
APPLICATIONS
Episode IV: A New Hope
Gil Zilberfeld
Typemock
Typemock
™
Who am I?
Software developer for 15 years
Technical Evangelist at Typemock
@gil_zilberfeld
• www.gilzilberfeld.com
Let me tell you about my first REAL job...
Typemock
™
What’s the plan?
Unit Testing 101
Tools
Examples
Start now
o It's not that hard
Typemock
™
What is unit testing?
Typemock
™
Why Unit Testing?
– Reduce pain
– Improve productivity
Typemock
™
Automated Unit Testing
Short feedback cycle
Typemock
™
Where do I start?
Typemock
™
SharePoint Development
The real world…
Typemock
™
And the worst part is
Typemock
™
So is SharePoint Untestable?
UNIT TESTING SHAREPOINT
APPLICATIONS
Episode V:
The frameworks strike back
Typemock
™
Dependencies
Typemock
™
Why do we need isolation?
Applications are complex
We can’t touch a live system
When we call SharePoint
Setup
Teardown
Repeat
Typemock
™
Isolation Frameworks to the Rescue
Typemock
™
Fakes help me change behavior without changing the code
Typemock
™
Fakes help me verify calls
ISOLATION FRAMEWORKS DEMO
Typemock
™
What are the differences?
Typemock
™
Unit tests are the antidote to stupid bugs
it's impossible to stick with unit testing without a framework
Typemock
™
Start now
It's a productivity tool
Make it part of your tool belt
Typemock
™
Resources Typemock
http://www.typemock.com
Moles http://research.microsoft.com/
en-us/projects/moles/
Mock Comparison Project http://code.google.com/p
/mocking-frameworks-compare/
Me: Twitter: @gil_zilberfeld http://www.gilzilberfeld.com [email protected]
Typemock
™
Questions?