Presentation is loading. Please wait.

Presentation is loading. Please wait.

12/4/2018 9:56 AM OSP432 Application Lifecycle Management - automated builds and testing for SharePoint projects Jay Schmelzer © 2007 Microsoft Corporation.

Similar presentations


Presentation on theme: "12/4/2018 9:56 AM OSP432 Application Lifecycle Management - automated builds and testing for SharePoint projects Jay Schmelzer © 2007 Microsoft Corporation."— Presentation transcript:

1 12/4/2018 9:56 AM OSP432 Application Lifecycle Management - automated builds and testing for SharePoint projects Jay Schmelzer © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

2 Chris O’Brien - Introduction
Independent SharePoint consultant Blog: Book: Real World SharePoint 2010 (20 MVPs) LinkedIn:

3 Challenges in SP2010 dev projects
Many dependencies Code, Features, timer jobs Deployment is complex No native support for WSP rollback Challenging to unit test Still not much traction in SharePoint world?

4 Challenges in *large* SP2010 dev projects
Tracking Hard to keep track of deployments/fixes Many developers = many deployments? Inefficiency Devs keeping environment up-to-date Inconsistent builds (or buildmaster bottleneck) Silly mistakes e.g. Incorrect versions Debug vs. Release mode Testing of actual WSPs Communication

5 Solution recipe Auto-compile of assemblies and build of WSPs
Correct versions in source control Add a label in source control to help rollback Auto incrementing assembly version number Better tracking of deployments/fixes etc. Deployment of WSPs to remote SharePoint 2010 environment Test environment, not developer machine UI testing Build fails on UI test failure Developer notifications

6 Solution ingredients Skills TFS Team Build workflow (.Net 4.0)
“Good enough” PowerShell “Good enough” workflow (3.5 OK) TFS Team Build workflow (.Net 4.0) Specifies sequence of steps PowerShell Deploys WSPs, other deployment steps e.g. teardown/setup site PowerShell remoting (preferred over PsExec) Allows PS on SharePoint box to be called from build server Invoke-Command -ComputerName “foo” { script }

7 Build definition Customize workflow Styles: What’s the trigger?
Manual, Scheduled (e.g. nightly), every check-in, Rolling builds etc. Customize workflow Mandatory for SharePoint builds Several workflows OOB DefaultProcessTemplate, LabProcessTemplate “Rebuild everything” Suits pre-live “Build current sprint against production state” Suits post-live

8 Chris O’Brien SharePoint MVP Independent
12/4/2018 9:56 AM demo Automating the build Chris O’Brien SharePoint MVP Independent © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

9 Coded UI tests – an introduction
Recorded on test agent desktop Support: browser (inc. AJAX), Silverlight, WPF, forms apps Generate code which can be modified (e.g. to pass data) Point and click to add assertions E.g. navigate to web part gallery, check web part present

10 Testing SharePoint with Coded UI Tests
12/4/2018 9:56 AM demo Testing SharePoint with Coded UI Tests Chris O’Brien SharePoint MVP Independent © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

11 Integrating coded UI tests into build
Call all test types from command line with MSTest.exe Unit tests, Coded UI tests, Load tests, Etc. Team Build ships with MSTest WF activity (wrapper) Preferred – edit workflow to move test logic block to *after* WSP deployment Ensure test assemblies are deployed (i.e. include in build)

12 Adding coded UI tests to the build
12/4/2018 9:56 AM demo Adding coded UI tests to the build Chris O’Brien SharePoint MVP Independent © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

13 Collecting system/event log data
Why stop at UI testing? Code analysis Unit tests SPDispose Check Load tests Video recordings Collecting system/event log data

14 Best practices Start on day 0 of project
Retro-fitting can be expensive Get fast feedback - have a lightweight/quick build run on check-in Compile all projects/build WSPs Suggestion - every SharePoint project should do this much Increment assembly versions (FileVersion) with label generated by build Leverage UI testing (with or without automated builds)

15 12/4/2018 9:56 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

16 Related Content DEV343 - Implementing Team Foundation Server in the Enterprise: Guide to a Successful Implementation DEV19-HOL - Discover How the New Features of Team Foundation Server 2012 Can Improve Collaboration in Your Development Team Find Me Later At – TLC 10am today

17 Resources Blog series - Continuous Integration for SharePoint Build scripts – PS remoting and SharePoint

18 Deliver the Best Productivity Experience
The Business Collaboration Platform for the Enterprise and the Internet The Business Collaboration Platform for the Enterprise & the Internet Deliver the Best Productivity Experience Cut Costs with a Unified Infrastructure Rapidly Respond to Business Needs The capabilities of SharePoint 2010 provide a powerful business collaboration platform

19 Project and SharePoint Better Together
Manage Resources Improve efficiency and save money by better managing work and allocation of resources Maximize Portfolio Returns Make informed investment decisions and effectively communicate results across a portfolio of projects Keep Teams Productive Save time and improve project results by centralizing team collaboration on deliverables and tasks Improve SharePoint ROI Effectively manage requests to maximize the ROI of your SharePoint environment

20 Resources Learning TechNet http://europe.msteched.com
Connect. Share. Discuss. Microsoft Certification & Training Resources TechNet Resources for IT Professionals Resources for Developers

21 Submit your evals online
12/4/2018 9:56 AM Evaluations Submit your evals online © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

22 12/4/2018 9:56 AM © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

23 Appendix slides

24 What you need - software
Automated builds = TFS 2010 (Team Build) Server + 1 CAL free with nearly every MSDN level Need CAL for every user who interacts Components: Build Controller, Build Agent Coded UI tests = Visual Studio 2010 Premium/Ultimate Components: Test Controller, Test Agent

25 What you need - hardware Option 1 – the EASY button
TechEd 2012 12/4/2018 9:56 AM What you need - hardware Option 1 – the EASY button Disadvantages: Risk to source control Performance SP TFS2010 = big resource reqs Bottom line: Don’t do this with prod source control! © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

26 What you need - hardware Option 2 – a sample topology
TechEd 2012 12/4/2018 9:56 AM What you need - hardware Option 2 – a sample topology © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

27 PowerShell remoting To enable - on SharePoint box
Task PS command Allow remote connections Enable-PSRemoting Raise memory limit (e.g. for WSP cmds) Set-Item WSMan:\localhost\Shell\MaxMemory PerShellMB 1000 Allow users from other domain Set registry key Also configure CredSSP authentication

28 12/4/2018 9:56 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "12/4/2018 9:56 AM OSP432 Application Lifecycle Management - automated builds and testing for SharePoint projects Jay Schmelzer © 2007 Microsoft Corporation."

Similar presentations


Ads by Google