SharePoint 2010 Unit and Integration Testing

  • Published on
    14-Oct-2015

  • View
    22

  • Download
    0

Embed Size (px)

DESCRIPTION

SharePoint 2010 Unit and Integration Testing

Transcript

<ul><li><p>Feature Coding</p><p>Part 3</p><p>Unit and Integration Testing</p><p>DEV_205Eric Shupps</p></li><li><p>Sponsored by:</p><p>Visit us on the web at www.binarywave.com</p><p>Real-time application monitoring, event management, and operational health metrics for Microsoft SharePoint</p><p>Reduce troubleshooting time by up to 30%Increase efficiency and improve user satisfactionAvoid downtime and costly outagesMeet or exceed service level agreementsMaximize investment in current infrastructure</p></li><li><p>About Me</p><p>Eric Shupps, MVP President, BinaryWave Email: eshupps@binarywave.com</p><p> Microsoft Patterns &amp; Practices: spg.codeplex.com CKS:DEV cksdev.codeplex.com Blog: www.sharepointcowboy.com Twitter: @eshupps Facebook: www.facebook.com/sharepointcowboy</p></li><li><p>Agenda</p><p> Testing FundamentalsCode OptimizationUnit Testing Integration Testing</p></li><li><p>Testing Fundamentals</p></li><li><p>Testing Objectives</p><p> Facilitate change Simplify integration Increase modularity</p><p> Faster changes Repeatable processes Increased confidence</p><p> Eliminate defects Validate functionality Reduce complexity</p><p> Less rework Shorter cycles Faster delivery times Fewer support </p><p>requests</p><p>ReduceCosts</p><p>EnsureQuality</p><p>ImproveDynamics</p><p>IncreaseEfficiency</p></li><li><p>Testing Methodologies Any methodology is </p><p>better than no methodology</p><p> Select a methodology that supports the team dynamic and satisfies the testing objectives</p><p> Code for the customer/end user, not the methodology</p><p> Focus on modularity and sustainability</p></li><li><p>Testing Lifecycle</p><p>Unit Integration Regression</p></li><li><p>Code Optimization</p></li><li><p>Code Isolation and RefactoringClass</p><p>Method Method Method Method Method Method</p><p>Class</p><p>Method Method</p><p>Class</p><p>Method Method</p><p>Class</p><p>Method Method</p><p>Test Test Test Test Test Test</p></li><li><p>CODE ISOLATIONRefactor the core solution components for testability.</p></li><li><p>Unit Testing</p></li><li><p>Unit Testing Objectives</p><p>CodeIsolate</p><p>Validate</p><p>Integrate</p><p>Refactor</p><p>Maintain</p></li><li><p>Unit Testing Principles Separate interface from </p><p>implementation Fail first in order to </p><p>succeed Tests do not drive </p><p>functionality - they verify functionality</p><p> Features define tests and tests define methods</p><p> Tests should exercise all probable execution paths</p></li><li><p>Unit Testing Methodologies Separate interface from </p><p>implementation Fail first in order to </p><p>succeed Tests do not drive </p><p>functionality - they verify functionality</p><p> Features define tests and tests define methods</p><p> Tests should exercise all probable execution paths</p></li><li><p>UNIT TESTSCreate and execute unit tests for isolated code.</p></li><li><p>IntegrationTesting</p></li><li><p>Integration Testing Objectives</p><p>Test code execution against </p><p>target system/dependenci</p><p>es </p><p>Verify methods as they will be used in </p><p>released code</p><p>Validate/invalidate unit test results</p><p>Exercise all points of interoperability</p><p>Identify vulnerabilities in execution chain</p></li><li><p>Integration Testing Principles Tests should exercise </p><p>actual dependencies no mocks or stubs</p><p> Tests should not be authored or driven by developer</p><p> Tests should cover all application tiers (top-down, bottom-up, or both)</p><p> Manual testing is acceptable (and often preferred)</p></li><li><p>Integration Testing Methodologies Inverse Isolation</p><p> Reusing unit tests by replacing mock or stub objects with actual implementations</p><p> Black Box Open-ended, interface-</p><p>driven tests that explore available functionality and are not driven by specific feature requirements</p><p> White Box Predefined set of test </p><p>routines that verify specific functional requirements</p></li><li><p>INTEGRATION TESTSCreate and execute integration tests for core solution components.</p></li><li><p>Thank you for attending!</p><p>(This slide must always be the last </p><p>slide in your deck)</p></li></ul>