SlideShare ist ein Scribd-Unternehmen logo
1 von 18
SharePoint Development with Unit Testing JEREMY THAKE
OBJECTIVES To explain the 3 goals of unit testing To explain where you can unit test To describe the 3 approaches to unit testing in SharePoint
Unit Testing Run quickly Run on every developer machine Minimal no config (We are not testing MS code)
Where to test? ASP.NET Web Forms Application Pages Web Parts Event Receivers Feature Receivers Workflow coding activities Timer Jobs
WHAT ITS NOT!
UNIT TEST 101 SETUP
TIGHTLY COUPLED CODE
SharePoint + Mocking Interfaces are rarely used Sealed classes Internal Constructors TypeMockIsolator for SharePoint
MOCKING 101
NATURAL MOCKS
SharePoint Guidance
WRAPPERS & façades
REPOSITORY
MVP – Model View Presenter
What to test? TDD - lots of code when 80% is usually SharePoint code Tests functionality and requirements work Can cover scenarios and edge cases Missing or empty URL variable Valid URL variable syntax Existence of the specified site Missing or empty ListName variable Existence of the specified list Valid SPListItemCollection return object Null or empty SPListItemCollection return object
MOCKING LARGE AREAS OF SHAREPOINT
CONCLUSION It not easy “Lots of code” Benefits when refactoring other developers changing it environment dependencies reduced speed Doesn't stop poor quality code: list.Items.Count Dispose()
JEREMY THAKE http://wss.made4the.net @jthake

Weitere ähnliche Inhalte

Was ist angesagt?

Why vREST?
Why vREST?Why vREST?
Why vREST?vrest_io
 
Katalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and DevelopersKatalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and DevelopersKatalon Studio
 
ATLAS Automation POC
ATLAS Automation POCATLAS Automation POC
ATLAS Automation POCaakashmc
 
Ppt of soap ui
Ppt of soap uiPpt of soap ui
Ppt of soap uipkslide28
 
So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...Joe Ferguson
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlowAiste Stikliute
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkOleksiy Rezchykov
 
SharePoint and Usability Testing
SharePoint and Usability TestingSharePoint and Usability Testing
SharePoint and Usability TestingChris Poteet
 
Reasons To Automate API Testing Process
Reasons To Automate API Testing ProcessReasons To Automate API Testing Process
Reasons To Automate API Testing ProcessQASource
 
Practical Tips & Tricks for Selenium Test Automation
Practical Tips & Tricks for Selenium Test AutomationPractical Tips & Tricks for Selenium Test Automation
Practical Tips & Tricks for Selenium Test AutomationSauce Labs
 
Visual Studio ALM 2013 - Edition Comparison
Visual Studio ALM 2013 - Edition ComparisonVisual Studio ALM 2013 - Edition Comparison
Visual Studio ALM 2013 - Edition ComparisonSteve Lange
 
V Greavu - Testing with Sharepoint
V Greavu - Testing with SharepointV Greavu - Testing with Sharepoint
V Greavu - Testing with SharepointTestCampRO
 
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)Vivek Chawla
 
Awesome Test Automation Made Simple w/ Dave Haeffner
Awesome Test Automation Made Simple w/ Dave HaeffnerAwesome Test Automation Made Simple w/ Dave Haeffner
Awesome Test Automation Made Simple w/ Dave HaeffnerSauce Labs
 
Web automation with Selenium for software engineers
Web automation with Selenium for software engineersWeb automation with Selenium for software engineers
Web automation with Selenium for software engineersMikalai Alimenkou
 
Introducing OpKey
Introducing OpKeyIntroducing OpKey
Introducing OpKeyopkey
 
API Virtualization: Mocking on Steroids
API Virtualization: Mocking on SteroidsAPI Virtualization: Mocking on Steroids
API Virtualization: Mocking on SteroidsSmartBear
 
Selenium 2 - PyCon 2011
Selenium 2 - PyCon 2011Selenium 2 - PyCon 2011
Selenium 2 - PyCon 2011hugs
 

Was ist angesagt? (20)

Why vREST?
Why vREST?Why vREST?
Why vREST?
 
Katalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and DevelopersKatalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and Developers
 
ATLAS Automation POC
ATLAS Automation POCATLAS Automation POC
ATLAS Automation POC
 
Ppt of soap ui
Ppt of soap uiPpt of soap ui
Ppt of soap ui
 
So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
 
SharePoint 2010 Development
SharePoint 2010 DevelopmentSharePoint 2010 Development
SharePoint 2010 Development
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
 
SharePoint and Usability Testing
SharePoint and Usability TestingSharePoint and Usability Testing
SharePoint and Usability Testing
 
Reasons To Automate API Testing Process
Reasons To Automate API Testing ProcessReasons To Automate API Testing Process
Reasons To Automate API Testing Process
 
Practical Tips & Tricks for Selenium Test Automation
Practical Tips & Tricks for Selenium Test AutomationPractical Tips & Tricks for Selenium Test Automation
Practical Tips & Tricks for Selenium Test Automation
 
Visual Studio ALM 2013 - Edition Comparison
Visual Studio ALM 2013 - Edition ComparisonVisual Studio ALM 2013 - Edition Comparison
Visual Studio ALM 2013 - Edition Comparison
 
Selenium IDE LOCATORS
Selenium IDE LOCATORSSelenium IDE LOCATORS
Selenium IDE LOCATORS
 
V Greavu - Testing with Sharepoint
V Greavu - Testing with SharepointV Greavu - Testing with Sharepoint
V Greavu - Testing with Sharepoint
 
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
 
Awesome Test Automation Made Simple w/ Dave Haeffner
Awesome Test Automation Made Simple w/ Dave HaeffnerAwesome Test Automation Made Simple w/ Dave Haeffner
Awesome Test Automation Made Simple w/ Dave Haeffner
 
Web automation with Selenium for software engineers
Web automation with Selenium for software engineersWeb automation with Selenium for software engineers
Web automation with Selenium for software engineers
 
Introducing OpKey
Introducing OpKeyIntroducing OpKey
Introducing OpKey
 
API Virtualization: Mocking on Steroids
API Virtualization: Mocking on SteroidsAPI Virtualization: Mocking on Steroids
API Virtualization: Mocking on Steroids
 
Selenium 2 - PyCon 2011
Selenium 2 - PyCon 2011Selenium 2 - PyCon 2011
Selenium 2 - PyCon 2011
 

Ähnlich wie Share Point Development With Unit Testing

Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Steve Lange
 
SF1 - Apex Development Best Practises
SF1 - Apex Development Best PractisesSF1 - Apex Development Best Practises
SF1 - Apex Development Best PractisesSebastian Wagner
 
Pragmatic Architecture in .NET
Pragmatic Architecture in .NETPragmatic Architecture in .NET
Pragmatic Architecture in .NEThousecor
 
Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010Ed Blankenship
 
Ddc2011 효과적으로레거시코드다루기
Ddc2011 효과적으로레거시코드다루기Ddc2011 효과적으로레거시코드다루기
Ddc2011 효과적으로레거시코드다루기Myeongseok Baek
 
Exploiting Context in Dealing with Programming Errors and Exceptions
Exploiting Context in Dealing with Programming Errors and ExceptionsExploiting Context in Dealing with Programming Errors and Exceptions
Exploiting Context in Dealing with Programming Errors and ExceptionsMasud Rahman
 
Refactoring to Testable Code
Refactoring to Testable CodeRefactoring to Testable Code
Refactoring to Testable CodeRichard Taylor
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicDavid Solivan
 
B4UConference_Sexy Angular Stack
B4UConference_Sexy Angular StackB4UConference_Sexy Angular Stack
B4UConference_Sexy Angular StackHoa Le
 
Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS appAleks Zinevych
 
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioSPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioNCCOMMS
 
How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.Matt Eland
 
Selenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabadSelenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabadSathya Technologies
 
Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...Sathya Technologies
 
Hands-on Experience Model based testing with spec explorer
Hands-on Experience Model based testing with spec explorer Hands-on Experience Model based testing with spec explorer
Hands-on Experience Model based testing with spec explorer Rachid Kherrazi
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Peyman Fakharian
 
Team Foundation Server 2010 - Overview
Team Foundation Server 2010 - OverviewTeam Foundation Server 2010 - Overview
Team Foundation Server 2010 - OverviewSteve Lange
 
Software Project Management - NESDEV
Software Project Management - NESDEVSoftware Project Management - NESDEV
Software Project Management - NESDEVKrit Kamtuo
 
Automated Testing Of EPiServer CMS Sites
Automated Testing Of EPiServer CMS SitesAutomated Testing Of EPiServer CMS Sites
Automated Testing Of EPiServer CMS Sitesjoelabrahamsson
 

Ähnlich wie Share Point Development With Unit Testing (20)

Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)
 
SF1 - Apex Development Best Practises
SF1 - Apex Development Best PractisesSF1 - Apex Development Best Practises
SF1 - Apex Development Best Practises
 
Pragmatic Architecture in .NET
Pragmatic Architecture in .NETPragmatic Architecture in .NET
Pragmatic Architecture in .NET
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010
 
Ddc2011 효과적으로레거시코드다루기
Ddc2011 효과적으로레거시코드다루기Ddc2011 효과적으로레거시코드다루기
Ddc2011 효과적으로레거시코드다루기
 
Exploiting Context in Dealing with Programming Errors and Exceptions
Exploiting Context in Dealing with Programming Errors and ExceptionsExploiting Context in Dealing with Programming Errors and Exceptions
Exploiting Context in Dealing with Programming Errors and Exceptions
 
Refactoring to Testable Code
Refactoring to Testable CodeRefactoring to Testable Code
Refactoring to Testable Code
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
B4UConference_Sexy Angular Stack
B4UConference_Sexy Angular StackB4UConference_Sexy Angular Stack
B4UConference_Sexy Angular Stack
 
Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS app
 
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioSPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
 
How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.
 
Selenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabadSelenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabad
 
Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...
 
Hands-on Experience Model based testing with spec explorer
Hands-on Experience Model based testing with spec explorer Hands-on Experience Model based testing with spec explorer
Hands-on Experience Model based testing with spec explorer
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium
 
Team Foundation Server 2010 - Overview
Team Foundation Server 2010 - OverviewTeam Foundation Server 2010 - Overview
Team Foundation Server 2010 - Overview
 
Software Project Management - NESDEV
Software Project Management - NESDEVSoftware Project Management - NESDEV
Software Project Management - NESDEV
 
Automated Testing Of EPiServer CMS Sites
Automated Testing Of EPiServer CMS SitesAutomated Testing Of EPiServer CMS Sites
Automated Testing Of EPiServer CMS Sites
 

Mehr von Jeremy Thake

Using Microsoft Teams to enhance your organizational productivity
Using Microsoft Teams to enhance your organizational productivityUsing Microsoft Teams to enhance your organizational productivity
Using Microsoft Teams to enhance your organizational productivityJeremy Thake
 
Connect with your customers wherever they are with an azure based mobile solu...
Connect with your customers wherever they are with an azure based mobile solu...Connect with your customers wherever they are with an azure based mobile solu...
Connect with your customers wherever they are with an azure based mobile solu...Jeremy Thake
 
Understand the future of software development in the cloud with the azure app...
Understand the future of software development in the cloud with the azure app...Understand the future of software development in the cloud with the azure app...
Understand the future of software development in the cloud with the azure app...Jeremy Thake
 
Connect with your customers wherever they are with an azure based mobile solu...
Connect with your customers wherever they are with an azure based mobile solu...Connect with your customers wherever they are with an azure based mobile solu...
Connect with your customers wherever they are with an azure based mobile solu...Jeremy Thake
 
Getting started with SharePoint 2013 online development
Getting started with SharePoint 2013 online developmentGetting started with SharePoint 2013 online development
Getting started with SharePoint 2013 online developmentJeremy Thake
 
Application lifecycle management in SharePoint
Application lifecycle management in SharePointApplication lifecycle management in SharePoint
Application lifecycle management in SharePointJeremy Thake
 
Acing application lifecycle management in SharePoint
Acing application lifecycle management in SharePointAcing application lifecycle management in SharePoint
Acing application lifecycle management in SharePointJeremy Thake
 
Getting started with microsoft office 365 share point online development
Getting started with microsoft office 365 share point online developmentGetting started with microsoft office 365 share point online development
Getting started with microsoft office 365 share point online developmentJeremy Thake
 
Presenting SharePoint as a service back to your organization
Presenting SharePoint as a service back to your organizationPresenting SharePoint as a service back to your organization
Presenting SharePoint as a service back to your organizationJeremy Thake
 
The future of social collaboration in SharePoint
The future of social collaboration in SharePointThe future of social collaboration in SharePoint
The future of social collaboration in SharePointJeremy Thake
 
Introducing the new SharePoint 2013 app model
Introducing the new SharePoint 2013 app modelIntroducing the new SharePoint 2013 app model
Introducing the new SharePoint 2013 app modelJeremy Thake
 
SharePoint 2013 overview jeremy thake
SharePoint 2013 overview   jeremy thakeSharePoint 2013 overview   jeremy thake
SharePoint 2013 overview jeremy thakeJeremy Thake
 
Getting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online developmentGetting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online developmentJeremy Thake
 
How to create a secure efficient extranet user experience
How to create a secure efficient extranet user experienceHow to create a secure efficient extranet user experience
How to create a secure efficient extranet user experienceJeremy Thake
 
How we built nothingbutsharepoint.com on sharepoint 2010
How we built nothingbutsharepoint.com on sharepoint 2010How we built nothingbutsharepoint.com on sharepoint 2010
How we built nothingbutsharepoint.com on sharepoint 2010Jeremy Thake
 
Governance enforcement with out of the box SharePoint
Governance enforcement with out of the box SharePointGovernance enforcement with out of the box SharePoint
Governance enforcement with out of the box SharePointJeremy Thake
 
Deep dive into feature versioning and upgrade support in SharePoint 2010
Deep dive into feature versioning and upgrade support in SharePoint 2010Deep dive into feature versioning and upgrade support in SharePoint 2010
Deep dive into feature versioning and upgrade support in SharePoint 2010Jeremy Thake
 
AUSPC 2011: How we did it: NothingButSharePoint.com
AUSPC 2011: How we did it: NothingButSharePoint.comAUSPC 2011: How we did it: NothingButSharePoint.com
AUSPC 2011: How we did it: NothingButSharePoint.comJeremy Thake
 
Do's and Don'ts for SharePoint developers
Do's and Don'ts for SharePoint developersDo's and Don'ts for SharePoint developers
Do's and Don'ts for SharePoint developersJeremy Thake
 
How Asp.Net Developers Can Leverage Share Point
How Asp.Net Developers Can Leverage Share PointHow Asp.Net Developers Can Leverage Share Point
How Asp.Net Developers Can Leverage Share PointJeremy Thake
 

Mehr von Jeremy Thake (20)

Using Microsoft Teams to enhance your organizational productivity
Using Microsoft Teams to enhance your organizational productivityUsing Microsoft Teams to enhance your organizational productivity
Using Microsoft Teams to enhance your organizational productivity
 
Connect with your customers wherever they are with an azure based mobile solu...
Connect with your customers wherever they are with an azure based mobile solu...Connect with your customers wherever they are with an azure based mobile solu...
Connect with your customers wherever they are with an azure based mobile solu...
 
Understand the future of software development in the cloud with the azure app...
Understand the future of software development in the cloud with the azure app...Understand the future of software development in the cloud with the azure app...
Understand the future of software development in the cloud with the azure app...
 
Connect with your customers wherever they are with an azure based mobile solu...
Connect with your customers wherever they are with an azure based mobile solu...Connect with your customers wherever they are with an azure based mobile solu...
Connect with your customers wherever they are with an azure based mobile solu...
 
Getting started with SharePoint 2013 online development
Getting started with SharePoint 2013 online developmentGetting started with SharePoint 2013 online development
Getting started with SharePoint 2013 online development
 
Application lifecycle management in SharePoint
Application lifecycle management in SharePointApplication lifecycle management in SharePoint
Application lifecycle management in SharePoint
 
Acing application lifecycle management in SharePoint
Acing application lifecycle management in SharePointAcing application lifecycle management in SharePoint
Acing application lifecycle management in SharePoint
 
Getting started with microsoft office 365 share point online development
Getting started with microsoft office 365 share point online developmentGetting started with microsoft office 365 share point online development
Getting started with microsoft office 365 share point online development
 
Presenting SharePoint as a service back to your organization
Presenting SharePoint as a service back to your organizationPresenting SharePoint as a service back to your organization
Presenting SharePoint as a service back to your organization
 
The future of social collaboration in SharePoint
The future of social collaboration in SharePointThe future of social collaboration in SharePoint
The future of social collaboration in SharePoint
 
Introducing the new SharePoint 2013 app model
Introducing the new SharePoint 2013 app modelIntroducing the new SharePoint 2013 app model
Introducing the new SharePoint 2013 app model
 
SharePoint 2013 overview jeremy thake
SharePoint 2013 overview   jeremy thakeSharePoint 2013 overview   jeremy thake
SharePoint 2013 overview jeremy thake
 
Getting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online developmentGetting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online development
 
How to create a secure efficient extranet user experience
How to create a secure efficient extranet user experienceHow to create a secure efficient extranet user experience
How to create a secure efficient extranet user experience
 
How we built nothingbutsharepoint.com on sharepoint 2010
How we built nothingbutsharepoint.com on sharepoint 2010How we built nothingbutsharepoint.com on sharepoint 2010
How we built nothingbutsharepoint.com on sharepoint 2010
 
Governance enforcement with out of the box SharePoint
Governance enforcement with out of the box SharePointGovernance enforcement with out of the box SharePoint
Governance enforcement with out of the box SharePoint
 
Deep dive into feature versioning and upgrade support in SharePoint 2010
Deep dive into feature versioning and upgrade support in SharePoint 2010Deep dive into feature versioning and upgrade support in SharePoint 2010
Deep dive into feature versioning and upgrade support in SharePoint 2010
 
AUSPC 2011: How we did it: NothingButSharePoint.com
AUSPC 2011: How we did it: NothingButSharePoint.comAUSPC 2011: How we did it: NothingButSharePoint.com
AUSPC 2011: How we did it: NothingButSharePoint.com
 
Do's and Don'ts for SharePoint developers
Do's and Don'ts for SharePoint developersDo's and Don'ts for SharePoint developers
Do's and Don'ts for SharePoint developers
 
How Asp.Net Developers Can Leverage Share Point
How Asp.Net Developers Can Leverage Share PointHow Asp.Net Developers Can Leverage Share Point
How Asp.Net Developers Can Leverage Share Point
 

Kürzlich hochgeladen

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Kürzlich hochgeladen (20)

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

Share Point Development With Unit Testing

Hinweis der Redaktion

  1. Where – web parts, asp.net forms, event receivers, feature receivers, workflow, timer jobsApproaches – wrappers/facades, repositories, mocking
  2. Spiking - Use PowerShell!Integration TestsWeb Tests
  3. VMReflectorWSPBuilderVisual Studio 2008MOSS 2007 IUSQL 2008Create new WSPBuilder ProjectCreate new Feature ReceiverCreate new Unit Test ProjectAdd references: Nunit, SharePoint, Typemock, WSPBuilder ProjectAdd using statementsShow ReSharper, NunitAct | arrange | assert
  4. Interfaces are rarely used: If our code that depends on an SPWeb could instead depend on an ISPWeb interface (assuming that SPWeb implemented ISPWeb), we could easily create a mock implementation of ISPWeb.  We could pass our mock into our code instead of an SPWeb. We could define the exact behavior of the mock. However, since SharePoint elements such as SPWeb, SPList, and SPItemEventProperties don’t implement public interfaces, this is not an option.Sealed classes: The SharePoint elements mentioned above are also sealed. Another mocking technique is to extend the type you want to mock overriding all the base class’s methods. Instances of the mock type can be substituted for the instances of the base type. However, since many SharePoint elements including the ones mentioned above are sealed, this technique is also not an option.Internal Constructor: SPWeb Even if there were no behavior in our dependent service that we need to override, we still would need to create an instance of it. Again, many SharePoint elements including the ones mentioned above have internal constructors so we are not expected to new up our instances, but rather get them for calling the SharePoint API.Collections with no Add method: Many of the collections provided by SharePoint such as SPItemEventDataCollection do not have a public Add method. This makes it difficult to mock if we can’t populate an instance of this collection with a controlled set of values. Pasted from <http://blogs.msdn.com/francischeung/archive/2008/08/22/unit-testing-sharepoint-2007-applications.aspx>
  5. Demo FeatureReceiver1 thru FeatureReceiver4
  6. Add try catch to check site not found, when passed in to see whether app code handles it
  7. Wrapping everything with repository model
  8. Another option is to provide an abstraction to the SharePoint API that can be mocked. A wrapper is an abstraction that provides a mirror of the SharePoint API. Pasted from <http://blogs.msdn.com/francischeung/archive/2008/08/22/unit-testing-sharepoint-2007-applications.aspx> A façade is an abstraction that simplifies the SharePoint API. Either approach takes a lot of work and may be very difficult to do well. Pasted from <http://blogs.msdn.com/francischeung/archive/2008/08/22/unit-testing-sharepoint-2007-applications.aspx>