SlideShare a Scribd company logo
1 of 22
Unit Testing SharePoint Applications Episode IV: A New Hope Gil Zilberfeld Typemock
Who am I? Software developer for 15 years Technical Evangelist at Typemock @gil_zilberfeld ,[object Object],Let me tell you about my first REAL job...
What’s the plan? Unit Testing 101 Tools  Examples Start now ,[object Object],[object Object]
Why Unit Testing? Reduce pain Improve productivity
Automated Unit Testing Short feedback cycle
Where do I start?
SharePoint Development The real world…
And the worst part is
So is SharePoint Untestable?
Unit Testing SharePoint Applications Episode V: The frameworks strike back
Dependencies
Why do we need isolation? ,[object Object]
 We can’t touch a live system When we call SharePoint Setup Teardown Repeat
Isolation Frameworks to the Rescue
Fakes help me change behavior without changing the code  
Fakes help me verify calls  
Isolation Frameworks Demo
What are the differences?
Unit tests are the antidote to stupid bugs it's impossible to stick with unit testing without a framework
Start now It's a productivity tool Make it part of your tool belt
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 gilz@typemock.com
Questions?

More Related Content

What's hot

20140925 fistb keynote
20140925 fistb keynote20140925 fistb keynote
20140925 fistb keynoteJames Coplien
 
Unit testing (workshop)
Unit testing (workshop)Unit testing (workshop)
Unit testing (workshop)Foyzul Karim
 
Specification by example and agile acceptance testing
Specification by example and agile acceptance testingSpecification by example and agile acceptance testing
Specification by example and agile acceptance testinggojkoadzic
 
MOTODEV Studio for Testing A platform testing based on Eclipse
MOTODEV Studio for Testing A platform testing based on EclipseMOTODEV Studio for Testing A platform testing based on Eclipse
MOTODEV Studio for Testing A platform testing based on Eclipsegustavoeliano
 
Defect life cycle and Defect Status Life Cycle
Defect life cycle and Defect Status Life CycleDefect life cycle and Defect Status Life Cycle
Defect life cycle and Defect Status Life Cyclepavansmiles
 
Improving developer tester collaboration with microsoft visual studio 2010
Improving developer tester collaboration with microsoft visual studio 2010Improving developer tester collaboration with microsoft visual studio 2010
Improving developer tester collaboration with microsoft visual studio 2010Mohamed Samy
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit TestingJoe Tremblay
 
Dot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarDot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarGiel Tettelaar
 
Build Your Mobile App Quality and Test Strategy
Build Your Mobile App Quality and Test StrategyBuild Your Mobile App Quality and Test Strategy
Build Your Mobile App Quality and Test StrategyTechWell
 
Workshop agile testing
Workshop agile testingWorkshop agile testing
Workshop agile testingJohn Marx
 
Benefit From Unit Testing In The Real World
Benefit From Unit Testing In The Real WorldBenefit From Unit Testing In The Real World
Benefit From Unit Testing In The Real WorldDror Helper
 
5 reasons you'll love to hate Agile Development
5 reasons you'll love to hate Agile Development5 reasons you'll love to hate Agile Development
5 reasons you'll love to hate Agile DevelopmentArin Sime
 
Architecting apps - Can we write better code by planning ahead?
Architecting apps - Can we write better code by planning ahead?Architecting apps - Can we write better code by planning ahead?
Architecting apps - Can we write better code by planning ahead?Paul Ardeleanu
 
Aistė Stikliutė - Testing in continuous delivery
Aistė Stikliutė - Testing in continuous deliveryAistė Stikliutė - Testing in continuous delivery
Aistė Stikliutė - Testing in continuous deliveryAgile Lietuva
 
I Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application TestingI Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application TestingPeter Presnell
 
Dev Nexus 2017 - TDD with React - Josh Quintana & Tom Gamble
Dev Nexus 2017 - TDD with React - Josh Quintana & Tom GambleDev Nexus 2017 - TDD with React - Josh Quintana & Tom Gamble
Dev Nexus 2017 - TDD with React - Josh Quintana & Tom GambleThomas Gamble
 

What's hot (19)

20140925 fistb keynote
20140925 fistb keynote20140925 fistb keynote
20140925 fistb keynote
 
Unit testing (workshop)
Unit testing (workshop)Unit testing (workshop)
Unit testing (workshop)
 
Specification by example and agile acceptance testing
Specification by example and agile acceptance testingSpecification by example and agile acceptance testing
Specification by example and agile acceptance testing
 
MOTODEV Studio for Testing A platform testing based on Eclipse
MOTODEV Studio for Testing A platform testing based on EclipseMOTODEV Studio for Testing A platform testing based on Eclipse
MOTODEV Studio for Testing A platform testing based on Eclipse
 
Defect life cycle and Defect Status Life Cycle
Defect life cycle and Defect Status Life CycleDefect life cycle and Defect Status Life Cycle
Defect life cycle and Defect Status Life Cycle
 
Improving developer tester collaboration with microsoft visual studio 2010
Improving developer tester collaboration with microsoft visual studio 2010Improving developer tester collaboration with microsoft visual studio 2010
Improving developer tester collaboration with microsoft visual studio 2010
 
Defect Life Cycle
Defect Life CycleDefect Life Cycle
Defect Life Cycle
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 
Dot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarDot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel Tettelar
 
Build Your Mobile App Quality and Test Strategy
Build Your Mobile App Quality and Test StrategyBuild Your Mobile App Quality and Test Strategy
Build Your Mobile App Quality and Test Strategy
 
Workshop agile testing
Workshop agile testingWorkshop agile testing
Workshop agile testing
 
Benefit From Unit Testing In The Real World
Benefit From Unit Testing In The Real WorldBenefit From Unit Testing In The Real World
Benefit From Unit Testing In The Real World
 
5 reasons you'll love to hate Agile Development
5 reasons you'll love to hate Agile Development5 reasons you'll love to hate Agile Development
5 reasons you'll love to hate Agile Development
 
Unit testing in PHP
Unit testing in PHPUnit testing in PHP
Unit testing in PHP
 
Architecting apps - Can we write better code by planning ahead?
Architecting apps - Can we write better code by planning ahead?Architecting apps - Can we write better code by planning ahead?
Architecting apps - Can we write better code by planning ahead?
 
Aistė Stikliutė - Testing in continuous delivery
Aistė Stikliutė - Testing in continuous deliveryAistė Stikliutė - Testing in continuous delivery
Aistė Stikliutė - Testing in continuous delivery
 
I Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application TestingI Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application Testing
 
Dev Nexus 2017 - TDD with React - Josh Quintana & Tom Gamble
Dev Nexus 2017 - TDD with React - Josh Quintana & Tom GambleDev Nexus 2017 - TDD with React - Josh Quintana & Tom Gamble
Dev Nexus 2017 - TDD with React - Josh Quintana & Tom Gamble
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 

Viewers also liked

Unit Testing in SharePoint 2010
Unit Testing in SharePoint 2010Unit Testing in SharePoint 2010
Unit Testing in SharePoint 2010Chris Weldon
 
Risk Management in SharePoint Governance
Risk Management in SharePoint GovernanceRisk Management in SharePoint Governance
Risk Management in SharePoint GovernanceChristian Buckley
 
V Greavu - Testing with Sharepoint
V Greavu - Testing with SharepointV Greavu - Testing with Sharepoint
V Greavu - Testing with SharepointTestCampRO
 
Agile SharePoint Development With Scrum
Agile SharePoint Development With ScrumAgile SharePoint Development With Scrum
Agile SharePoint Development With ScrumAndrew Woodward
 
Information architecture and SharePoint
Information architecture and SharePointInformation architecture and SharePoint
Information architecture and SharePointLulu Pachuau
 
An SDLC for SharePoint
An SDLC for SharePointAn SDLC for SharePoint
An SDLC for SharePointgvaughan
 
Testing SharePoint solutions overview
Testing SharePoint solutions overviewTesting SharePoint solutions overview
Testing SharePoint solutions overviewSpiffy
 
Quality Assurance in SDLC
Quality Assurance in SDLCQuality Assurance in SDLC
Quality Assurance in SDLCAdil Mughal
 
Deep Dive into SharePoint Topologies and Server Architecture for SharePoint 2013
Deep Dive into SharePoint Topologies and Server Architecture for SharePoint 2013Deep Dive into SharePoint Topologies and Server Architecture for SharePoint 2013
Deep Dive into SharePoint Topologies and Server Architecture for SharePoint 2013K.Mohamed Faizal
 

Viewers also liked (11)

Unit Testing in SharePoint 2010
Unit Testing in SharePoint 2010Unit Testing in SharePoint 2010
Unit Testing in SharePoint 2010
 
Managesp 160805190411
Managesp 160805190411Managesp 160805190411
Managesp 160805190411
 
Risk Management in SharePoint Governance
Risk Management in SharePoint GovernanceRisk Management in SharePoint Governance
Risk Management in SharePoint Governance
 
V Greavu - Testing with Sharepoint
V Greavu - Testing with SharepointV Greavu - Testing with Sharepoint
V Greavu - Testing with Sharepoint
 
Case Study for a SharePoint SDLC
Case Study for a SharePoint SDLCCase Study for a SharePoint SDLC
Case Study for a SharePoint SDLC
 
Agile SharePoint Development With Scrum
Agile SharePoint Development With ScrumAgile SharePoint Development With Scrum
Agile SharePoint Development With Scrum
 
Information architecture and SharePoint
Information architecture and SharePointInformation architecture and SharePoint
Information architecture and SharePoint
 
An SDLC for SharePoint
An SDLC for SharePointAn SDLC for SharePoint
An SDLC for SharePoint
 
Testing SharePoint solutions overview
Testing SharePoint solutions overviewTesting SharePoint solutions overview
Testing SharePoint solutions overview
 
Quality Assurance in SDLC
Quality Assurance in SDLCQuality Assurance in SDLC
Quality Assurance in SDLC
 
Deep Dive into SharePoint Topologies and Server Architecture for SharePoint 2013
Deep Dive into SharePoint Topologies and Server Architecture for SharePoint 2013Deep Dive into SharePoint Topologies and Server Architecture for SharePoint 2013
Deep Dive into SharePoint Topologies and Server Architecture for SharePoint 2013
 

Similar to Unit Testing SharePoint Applications

A Mockery of a persentation
A Mockery of a persentationA Mockery of a persentation
A Mockery of a persentationGil Zilberfeld
 
[Rakuten TechConf2014] [G-4] Beyond Agile Testing to Lean Development
[Rakuten TechConf2014] [G-4] Beyond Agile Testing to Lean Development[Rakuten TechConf2014] [G-4] Beyond Agile Testing to Lean Development
[Rakuten TechConf2014] [G-4] Beyond Agile Testing to Lean DevelopmentRakuten Group, Inc.
 
When you get lost in api testing #ForumPHP
When you get lost in api testing #ForumPHPWhen you get lost in api testing #ForumPHP
When you get lost in api testing #ForumPHPPaula Čučuk
 
Test Drive Development
Test Drive DevelopmentTest Drive Development
Test Drive Developmentsatya sudheer
 
Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012
Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012
Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012TEST Huddle
 
5-Ways-to-Revolutionize-Your-Software-Testing
5-Ways-to-Revolutionize-Your-Software-Testing5-Ways-to-Revolutionize-Your-Software-Testing
5-Ways-to-Revolutionize-Your-Software-TestingMary Clemons
 
Graham Thomas - Software Testing Secrets We Dare Not Tell - EuroSTAR 2013
Graham Thomas - Software Testing Secrets We Dare Not Tell - EuroSTAR 2013Graham Thomas - Software Testing Secrets We Dare Not Tell - EuroSTAR 2013
Graham Thomas - Software Testing Secrets We Dare Not Tell - EuroSTAR 2013TEST Huddle
 
Einführung Test-driven Development
Einführung Test-driven DevelopmentEinführung Test-driven Development
Einführung Test-driven DevelopmentTimo Stollenwerk
 
Loopt unit test experiences
Loopt unit test experiencesLoopt unit test experiences
Loopt unit test experiencesHeine Frifeldt
 
Unit testing solid fundamentals
Unit testing solid fundamentalsUnit testing solid fundamentals
Unit testing solid fundamentalsMilan Vukoje
 
An Introduction to Developer Testing
An Introduction to Developer TestingAn Introduction to Developer Testing
An Introduction to Developer TestingWill Green
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flexmichael.labriola
 
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...Turkish Testing Board
 
Stop fearing legacy code
Stop fearing legacy codeStop fearing legacy code
Stop fearing legacy codeYaki Koren
 
Saksham Sarode - Innovation Through Introspection - EuroSTAR 2012
Saksham Sarode - Innovation Through Introspection - EuroSTAR 2012Saksham Sarode - Innovation Through Introspection - EuroSTAR 2012
Saksham Sarode - Innovation Through Introspection - EuroSTAR 2012TEST Huddle
 

Similar to Unit Testing SharePoint Applications (20)

A Mockery of a persentation
A Mockery of a persentationA Mockery of a persentation
A Mockery of a persentation
 
[Rakuten TechConf2014] [G-4] Beyond Agile Testing to Lean Development
[Rakuten TechConf2014] [G-4] Beyond Agile Testing to Lean Development[Rakuten TechConf2014] [G-4] Beyond Agile Testing to Lean Development
[Rakuten TechConf2014] [G-4] Beyond Agile Testing to Lean Development
 
When you get lost in api testing #ForumPHP
When you get lost in api testing #ForumPHPWhen you get lost in api testing #ForumPHP
When you get lost in api testing #ForumPHP
 
Test Drive Development
Test Drive DevelopmentTest Drive Development
Test Drive Development
 
Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012
Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012
Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012
 
5-Ways-to-Revolutionize-Your-Software-Testing
5-Ways-to-Revolutionize-Your-Software-Testing5-Ways-to-Revolutionize-Your-Software-Testing
5-Ways-to-Revolutionize-Your-Software-Testing
 
Unit testing, principles
Unit testing, principlesUnit testing, principles
Unit testing, principles
 
Graham Thomas - Software Testing Secrets We Dare Not Tell - EuroSTAR 2013
Graham Thomas - Software Testing Secrets We Dare Not Tell - EuroSTAR 2013Graham Thomas - Software Testing Secrets We Dare Not Tell - EuroSTAR 2013
Graham Thomas - Software Testing Secrets We Dare Not Tell - EuroSTAR 2013
 
Types of tests
Types of testsTypes of tests
Types of tests
 
Einführung Test-driven Development
Einführung Test-driven DevelopmentEinführung Test-driven Development
Einführung Test-driven Development
 
Loopt unit test experiences
Loopt unit test experiencesLoopt unit test experiences
Loopt unit test experiences
 
Unit testing solid fundamentals
Unit testing solid fundamentalsUnit testing solid fundamentals
Unit testing solid fundamentals
 
An Introduction to Developer Testing
An Introduction to Developer TestingAn Introduction to Developer Testing
An Introduction to Developer Testing
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
UPC Plone Testing Talk
UPC Plone Testing TalkUPC Plone Testing Talk
UPC Plone Testing Talk
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Why unit testingl
Why unit testinglWhy unit testingl
Why unit testingl
 
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
 
Stop fearing legacy code
Stop fearing legacy codeStop fearing legacy code
Stop fearing legacy code
 
Saksham Sarode - Innovation Through Introspection - EuroSTAR 2012
Saksham Sarode - Innovation Through Introspection - EuroSTAR 2012Saksham Sarode - Innovation Through Introspection - EuroSTAR 2012
Saksham Sarode - Innovation Through Introspection - EuroSTAR 2012
 

More from Gil Zilberfeld

Dirty tests and How To Clean Them
Dirty tests and How To Clean ThemDirty tests and How To Clean Them
Dirty tests and How To Clean ThemGil Zilberfeld
 
Unit testing for Grown-ups
Unit testing for Grown-upsUnit testing for Grown-ups
Unit testing for Grown-upsGil Zilberfeld
 
Zen and the art of Test Maintenance - #TestIL Meetup Tel Aviv
Zen and the art of Test Maintenance - #TestIL Meetup Tel AvivZen and the art of Test Maintenance - #TestIL Meetup Tel Aviv
Zen and the art of Test Maintenance - #TestIL Meetup Tel AvivGil Zilberfeld
 
Zen And the Art of Test Maintenance Presentation
Zen And the Art of Test Maintenance PresentationZen And the Art of Test Maintenance Presentation
Zen And the Art of Test Maintenance PresentationGil Zilberfeld
 
Spock: It's Only Logical
Spock: It's Only LogicalSpock: It's Only Logical
Spock: It's Only LogicalGil Zilberfeld
 
Better Estimation and Planning
Better Estimation and PlanningBetter Estimation and Planning
Better Estimation and PlanningGil Zilberfeld
 
Dependency injection and Why It Matters to Testers
Dependency injection and Why It Matters to TestersDependency injection and Why It Matters to Testers
Dependency injection and Why It Matters to TestersGil Zilberfeld
 
Zen and the Art of Test Maintenance
Zen and the Art of Test MaintenanceZen and the Art of Test Maintenance
Zen and the Art of Test MaintenanceGil Zilberfeld
 
Spring Testing Features
Spring Testing FeaturesSpring Testing Features
Spring Testing FeaturesGil Zilberfeld
 
Better Estimation and Planning
Better Estimation and PlanningBetter Estimation and Planning
Better Estimation and PlanningGil Zilberfeld
 
Real Life Test Maintenance
Real Life Test MaintenanceReal Life Test Maintenance
Real Life Test MaintenanceGil Zilberfeld
 
The Whole Story - Mapping, Slicing and Figuring things out
The Whole Story - Mapping, Slicing and Figuring things outThe Whole Story - Mapping, Slicing and Figuring things out
The Whole Story - Mapping, Slicing and Figuring things outGil Zilberfeld
 
Beter code for better tests
Beter code for better testsBeter code for better tests
Beter code for better testsGil Zilberfeld
 
The fastest BDD crash-course ever
The fastest BDD crash-course everThe fastest BDD crash-course ever
The fastest BDD crash-course everGil Zilberfeld
 
Playing games remotely
Playing games remotelyPlaying games remotely
Playing games remotelyGil Zilberfeld
 
An agile introduction to DevOps
An agile introduction to DevOpsAn agile introduction to DevOps
An agile introduction to DevOpsGil Zilberfeld
 

More from Gil Zilberfeld (20)

Dirty tests and How To Clean Them
Dirty tests and How To Clean ThemDirty tests and How To Clean Them
Dirty tests and How To Clean Them
 
Unit testing for Grown-ups
Unit testing for Grown-upsUnit testing for Grown-ups
Unit testing for Grown-ups
 
Zen and the art of Test Maintenance - #TestIL Meetup Tel Aviv
Zen and the art of Test Maintenance - #TestIL Meetup Tel AvivZen and the art of Test Maintenance - #TestIL Meetup Tel Aviv
Zen and the art of Test Maintenance - #TestIL Meetup Tel Aviv
 
Zen And the Art of Test Maintenance Presentation
Zen And the Art of Test Maintenance PresentationZen And the Art of Test Maintenance Presentation
Zen And the Art of Test Maintenance Presentation
 
Spock: It's Only Logical
Spock: It's Only LogicalSpock: It's Only Logical
Spock: It's Only Logical
 
Better Estimation and Planning
Better Estimation and PlanningBetter Estimation and Planning
Better Estimation and Planning
 
Dependency injection and Why It Matters to Testers
Dependency injection and Why It Matters to TestersDependency injection and Why It Matters to Testers
Dependency injection and Why It Matters to Testers
 
Zen and the Art of Test Maintenance
Zen and the Art of Test MaintenanceZen and the Art of Test Maintenance
Zen and the Art of Test Maintenance
 
Spring Testing Features
Spring Testing FeaturesSpring Testing Features
Spring Testing Features
 
Better Estimation and Planning
Better Estimation and PlanningBetter Estimation and Planning
Better Estimation and Planning
 
The Untold User Story
The Untold User StoryThe Untold User Story
The Untold User Story
 
Real Life Test Maintenance
Real Life Test MaintenanceReal Life Test Maintenance
Real Life Test Maintenance
 
The Whole Story - Mapping, Slicing and Figuring things out
The Whole Story - Mapping, Slicing and Figuring things outThe Whole Story - Mapping, Slicing and Figuring things out
The Whole Story - Mapping, Slicing and Figuring things out
 
Fractal test planning
Fractal test planningFractal test planning
Fractal test planning
 
Beter code for better tests
Beter code for better testsBeter code for better tests
Beter code for better tests
 
The fastest BDD crash-course ever
The fastest BDD crash-course everThe fastest BDD crash-course ever
The fastest BDD crash-course ever
 
Agile Intro to DevOps
Agile Intro to DevOpsAgile Intro to DevOps
Agile Intro to DevOps
 
Playing games remotely
Playing games remotelyPlaying games remotely
Playing games remotely
 
A Horror Story
A Horror StoryA Horror Story
A Horror Story
 
An agile introduction to DevOps
An agile introduction to DevOpsAn agile introduction to DevOps
An agile introduction to DevOps
 

Recently uploaded

Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

Unit Testing SharePoint Applications

Editor's Notes

  1. I am not a sharepoint manI’m a unit testnig man. I’m going to show you examples, from real life codeHow many people do unit tests? Use isolation frameworkSo let’s talk about me.
  2. My Tank storyI couldn’t test parts of the system separately, and that’s what unit testing is about. If I could, it will not take 3 months till the next test, and I would know if my fixes were correct (they we’re not).
  3. How do you do unit testingHow is the SharePoint world different (or similar) to the rest of the world
  4. Testing units of the software, without the restSimple, but not easily achievable.Software is already kvetched together from the get go.And SharePoint is a 3rd party which we don’t have control over. We cannot disconnect from the server.
  5. My team was always fighting over because of broken builds.My testers did not trust the devs.As a manager, I had to deal with that. Oh the headache.Two questions: How do you know your stuff works?How do you know you haven’t broken anything?And then comes magicPeople are not afraid to make changes to their codeYou know exactly what failedIt takes a lot less time to debugNo more stupid bugzIt makes you THINK about the code you’re writing.It makes you a professional – you are responsible to test your code, not QA
  6. Moment of Hebrew:Unit testing = Automated unit testing.When I started at Bio-Rad (1997) the first thing they taught me was unit testing. Manual.VB Form, for a C++ COM componnet.This is not repeatable.When I changed my code, I did not go through all the scenarios I’ve already tested.And when you fix a bug, in a component written 6 months ago, would you even remember? No.Unit tests help you remember, and remind you.When something breaks, you’ll know immediately. The sooner the better. And mostly, that’s what automated unit tests do. They shorten the feedback cycle from weeks and months to seconds and minutes. It’s easier to fix something that you just wrote.And this is key: unit tests should run quickly. If they don’t the vicious cycle begins: No quick feedback, less test runs. Then why should I write tests if I don’t run them, and the road to hell is now paved.
  7. Let’s take a look at the environment.First we need a framework. We need to say – this is a test, and that’s the criteria for pass/fail.Then you need a runner, and result view.MSTest (yes, there’s NUnit, but you don’t need it).Show logic of webpartCreate a new projectAdd referenceShow attributesWrite //AAARename testWrite testRun test.Notice we’re testing logic.In the real world, it’s not that easy.
  8. Code is not testable by default.All kind of tutorials, don’t prepare you for testability. They give you unstructured code. This has changed about a year ago with P&P promoting unit tests.Who knows what P&P is?It’s still not enough. We’ll go into MS ambivalent relations with unit testing later.Who is using SP 2010? Some improvement there since 2008.The F5 Build/Deploy/ Test cycle is slow. It takes minutes. Slowness, kills unit tests.Speaking of which, who uses a virtual environment for development? It’s slow by nature.
  9. SharePoint is the example I use for dependency problem.For the case I showed in my webpart, I need to set up differnet SharePoint setups.Imagine how many I setups I’ll need to test every scenario in the application? How long it will take them to run?Will I do it? Will you do it?No. The problem, is that SharePoint is a dependency, and it’s a problem to get rid of.Because SharePoint objects don’t lend themselves for simulations.They have private consttructors. Cannot inject them directly or through Dis.They are sealed and cannot be overridden. These are the two major ways to change behavior.
  10. We’ll see about that in the next session.
  11. Dependencies is why most people stop doing unit testing.Overriding dependencies is hard.
  12. Let you change the behavior of your code, without changing it. (mostly)Basically, isolation frameworks allow you to do 2 thing by creating fake objects.
  13. This is important: Without changing my production code.
  14. The Asserts I showed you before test state: properties, fields.What happens if I want to make sure a method was called with the correct arguments?Like database connect?With SharePoint its worse, because most of the object model is designed for reading, not building it..
  15. For the SharePoint crowd, there are currently two options: Typemock Isolator and Microsoft Moles.I’ll show you examples for both.Isolator was until recenty the only way to test SharePoint. That’s because it can fake any type – statics, sealed, you name it. P&P said so.Microsoft is between two places: the P&P says do unit tests. But the SharePoint team doesn’t do it themselves., and produce something not testable.What did they do?Moles was until 3 months ago a research project, part of the Pex project. It is now a power tool. This means most people don’t even know it exists. MS doesn’t want to push unit testing.So I’m going to show you how tests look like in both cases. I’m not going to do all the process. I want to give you a feeling on how tests looks like with SharePoint.Example 1: Webpart.Isolator References APIsMoles Lambdas
  16. CostBoth can fake everything.Isolator is easier to write/readMoles doesn’t have a verify.With Moles you really need to know your lambdas. It’s painful.Isolator has more features, more functionality. It is a decidedly unit testing toolMicrosoft is not pushing it – hard to find examples on the net. 1 man show.And besides, we’re smarter and better looking.
  17. Which ever tool you use you need to understand, that you need a tool.Stupid bugz.You can start by downloading Isolator and Moles. Start writing unit tests.