979 Professional Application Lifecycle Management with Visual Studio 2010
Join the discussion @ p2p.wrox.com Wrox Programmer to Programmer™ Professional
Application Lifecycle
Management ® with Visual Studio 2010™ Programmer to Programmer
Get more out of Interact Join the Community Take an active role online by participating in our Sign up for our free monthly newsletter at P2P forums @ p2p.wrox.com newsletter.wrox.com Wrox Online Library Browse Hundreds of our books are available online Ready for more Wrox? We have books and through Books24x7.com e-books available on .NET, SQL Server, Java,
XML, Visual Basic, C#/ C++, and much more! Wrox Blox Download short informational pieces and code to keep you up to date and out of trouble!
Contact Us.
We always like to get feedback from our readers. Have a book idea?
PROFESSIONAL APPLICATION LIFECYCLE MANAGEMENT WITH VISUAL STUDIO
®
2010
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
PART I ARCHITECT CHAPTER 1 Introduction to Software Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 CHAPTER 2 Top-down Design with Use Case Diagrams, Activity Diagrams, and Sequence Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
⊲ ⊲ ⊲
CHAPTER 3 Top-down Design with Component and Class Diagrams . . . . . . . . . . . . 33 CHAPTER 4 Analyzing Applications Using Architecture Explorer . . . . . . . . . . . . . . . . 59 CHAPTER 5 Using Layer Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81 PART II DEVELOPER CHAPTER 6 Introduction to Software Development . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 CHAPTER 7 Unit Testing with the Unit Test Framework . . . . . . . . . . . . . . . . . . . . . . . . 99 CHAPTER 8 Managed Code Analysis and Code Metrics . . . . . . . . . . . . . . . . . . . . . . 139 CHAPTER 9 Profi ling and Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 CHAPTER 10 Database Development, Testing, and Deployment . . . . . . . . . . . . . . . . 201 CHAPTER 11 Introduction to IntelliTrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 PART III TESTER CHAPTER 12 Introduction to Software Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 CHAPTER 13 Web Performance and Load Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 CHAPTER 14 Manual Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 CHAPTER 15 Coded User Interface Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 CHAPTER 16 Lab Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 Continues
PART IV TEAM FOUNDATION SERVER CHAPTER 17 Introduction to Team Foundation Server . . . . . . . . . . . . . . . . . . . . . . . . . 379 CHAPTER 18 Team Foundation Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 CHAPTER 19 Team Foundation Version Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 CHAPTER 20 Branching and Merging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 CHAPTER 21 Team Foundation Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .471 PART V PROJECT/PROCESS MANAGEMENT CHAPTER 22 Introduction to Project Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521 CHAPTER 23 Process Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 CHAPTER 24 Using Reports, Portals, and Dashboards . . . . . . . . . . . . . . . . . . . . . . . . . 571 CHAPTER 25 Agile Planning Using Planning Workbooks . . . . . . . . . . . . . . . . . . . . . . . 599 CHAPTER 26 Process Template Customizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615 INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 ⊲ ⊲
PROFESSIONAL
Application Lifecycle Management
with Visual Studio® 2010
PROFESSIONAL
Application Lifecycle Management
with Visual Studio® 2010
Mickey Gousset
Brian Keller
Ajoy Krishnamoorthy
Martin Woodward
Professional Application Lifecycle Management with Visual Studio® 2010 Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 Copyright © 2010 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada
ISBN: 978-0-470-48426-5 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means,
electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108
of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or onlinLimit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifi cally disclaim all warranties, including without limitation warranties of fi tness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional
services. If professional assistance is required, the services of a competent professional person should be sought. Neither
the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site isreferred to in this work as a citation and/or a potential source of further information does not mean that the author or the
publisher endorses the information the organization or Web site may provide or recommendations it may make. Further,
readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this
work was written and when it is read.For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available
in electronic books.Library of Congress Control Number: 2010921244 Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affi liates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.
This book is dedicated to my wife, Amye Gousset. Once again, I scratched the itch to write, and once again, she provided me all the love and support I
needed to make it happen. Amye, I love you more and
more each day.— Mickey Gousset This book is dedicated to my parents, Ray and Sue Ellen Keller, who laid the foundation for me to embark upon a lifetime of learning and a love of technology. As a kid, they let me hijack the family computer to teach myself how to program, and as a
young adult, they gave me the inspiration to explore
my passions, and the freedom to learn from my failures. Mom and Dad, I love you.— Brian Keller I dedicate this book to my best friend and my wife,
Vidhya, and our wonderful children, Atul and Aditi.
Thank you for everything.
— Ajoy Krishnamoorthy To Catherine, William, and Jamie.
— Martin Woodward
ABOUT THE AUTHORS
MICKEY GOUSSET is a Senior Technical Developer for Infront Consulting Group, a consulting company focused on the Microsoft System Center family of products.
He has been a Microsoft Team System MVP fi ve years running, a certifi ed professional in Team Foundation Server and SCOM 2007, and co-author (along with Jean-Luc David and Erik Gunvaldson) of the book Professional Team Foundation Server
(Indianapolis: Wiley, 2006). Gousset runs “Team System Rocks!” ( http://www.teamsystemrocks
.com ), a community site devoted to Visual Studio Team System and Visual Studio 2010, where he
also blogs about Visual Studio and Team Foundation Server. He is also a co-host of the popular Team Foundation Server podcast, “Radio TFS” ( http://www.radiotfs.com ). He has spoken on Visual Studio and Team Foundation Server topics at various user groups, code camps, and conferences, including Microsoft Tech Ed Developer — North America 2008 and 2009. When not writing or working with computers, Mickey enjoys a range of hobbies, from playing on Xbox Live (“Gamer Tag: HereBDragons”) to participating in local community theater. Nothing beats his favorite pastime though — sitting on his couch with his lovely wife Amye, and their two Chihuahuas, Lucy and Linus.
BRIAN KELLER is a Senior Technical Evangelist for Microsoft, specializing in Visual
Studio and application lifecycle management. Keller has been with Microsoft since 2002, and has presented at conferences all over the world, including TechEd, Professional Developers Conference (PDC), and MIX. Keller is also a regular personality on MSDN’s Channel 9 Web site, and is co-host of the popular show,
“This Week on Channel 9.” Outside of work, he can usually be found enjoying the great outdoors while either rock climbing, backpacking, skiing, or surfi ng.
AJOY KRISHNAMOORTHY is a Senior Product Manager in the Microsoft Patterns
and Practices group. In this role, he focuses on planning the areas of investments and business strategy for Patterns and Practices. Prior to this role, Krishnamoorthy worked as a Senior Product Manager for Microsoft Visual Studio Team System. He has more than ten years of consulting experience, playing variety of roles, including developer, architect, and technical project manager. Krishnamoorthy has written articles for online and printed magazines, and co-authored several books on ASP.NET. You can check out his blog at http://blogs.msdn.com/ajoyk. Krishnamoorthy has an MBA from Ohio State University. Any spare time is spent with his family, playing board/card games with friends, watching sports (especially when the Ohio State Buckeyes are playing), and learning to play “Tabla.”
is currently the Program Manager for the Microsoft Visual Studio Team Foundation Server Cross-Platform Tools Team. Before joining Microsoft, Woodward was voted Team System MVP of the Year, and has spoken about Team Foundation Server at events internationally. Not only does Woodward bring a unique insight into the inner workings of the product he has experienced from more than a half-decade of real-world use at companies big and small, he is also always happy to share. When not working or speaking, Woodward can be found at his blog, http://www.woodwardweb.com.
MARTIN WOODWARD
CREDITS EXECUTIVE EDITOR
VICE PRESIDENT AND EXECUTIVE GROUP PUBLISHER
INDEXER
Scott Klemp, Maraya Cornell, Carrie Hunter, Word One
PROOFREADERS
© Ben Blankenburg/istockphoto
COVER PHOTO
Michael E. Trent
COVER DESIGNER
Lynsey Stanford
PROJECT COORDINATOR, COVER
Jim Minatel
ASSOCIATE PUBLISHER
Barry Pruett
VICE PRESIDENT AND EXECUTIVE PUBLISHER
Richard Swadley
Tim Tate
Robert Elliott
COPY EDITOR
DEVELOPMENT EDITOR
Kevin Shafer
TECHNICAL EDITORS
Siddharth Bhatia Justin Marks Peter Provost Mario Rodriguez Clark Sell David Williamson
PRODUCTION EDITOR
Rebecca Anderson
Christopher Jones
PRODUCTION MANAGER
EDITORIAL DIRECTOR
Robyn B. Siesky
EDITORIAL MANAGER
Mary Beth Wakefi eld
ASSOCIATE DIRECTOR OF MARKETING
David Mayhew
J & J Indexing
ACKNOWLEDGMENTS
FIRST OFF, I WANT TO THANK AJOY, BRIAN, AND MARTIN for taking this journey with me. You have
been incredible people to work with, and have truly made this a great experience. I’d like to thank everyone at Wiley and Wrox, specifi cally Bob Elliot and Kevin Shafer, our editors. This book could not have happened without their help and constant attention to detail. We also had some amazing people doing technical edits on this book, including Clark Sell, Peter Provost, Siddharth Bhatia, Mario Rodriguez, Justin Marks, David Williamson, and I’m sure many other names that I’ve overlooked. To everyone who has helped to make this book the great product that it is, I thank you. Finally, a big thank you to my family for your understanding, love, and support during the late nights and long weekends when I disappeared into my offi ce to write.
— Mickey Gousset THE EFFORTS OF SO MANY PEOPLE went into the realization of this book that it’s hard to know
where to begin. Perhaps most fundamentally is the work of the engineering team within Microsoft’s developer division, who have an insatiable drive for shipping great software that helps other software development teams around the world realize their full potential. Visual Studio 2010 is an incredibly exciting release, and is the inspiration for this book. David Williamson was the primary technical reviewer for the chapters I contributed, and his thoughtful suggestions contributed greatly to the quality of this book. I also received help from Anutthara Bharadwaj, Daryush Laqab, Ed Glas, Euan Garden, Gautam Goenka, Habib Heydarian, Katrina Lyon-Smith, Mark Mydland, Michael Rigler, Tanuj Vohra, Ted Malone, Vinod Malhotra, and scores of others over the last year and a half. Finally, I would like to thank our publisher and my co-authors, who I am proud to share this accomplishment with.
—Brian Keller
I OWE A BIG THANKS TO MY good friend Jean-Luc David for his persistence in getting me to work on this book. I was fortunate to have the chance to work with a talented team of fellow authors.
Mickey, Brian and Martin, thank you, and I truly enjoyed working with you on this book. Several members of the Visual Studio team offered their help, and I am thankful for that. I owe a lot of gratitude to Aaron Bjork, Siddharth Bhatia, John Socha-Leialoha, Sunder Raman, David Brokaw, Gokula Thilagar, Habib Heydarian, Justin Marks, and Brad Sullivan. They were all busy shipping a product, but never hesitated to help me when I reached them with questions, or needed more information and access to pre-release bits. Thanks to every one of you for your timely help. I want to thank my manager John deVadoss and my colleagues at Patterns and Practices for their great support and encouragement throughout the course of this writing project. Finally, I can’t thank my family enough for allowing me to spend countless hours during evenings and weekends on this book. Vidhya, Atul, and Aditi, none of this would have been possible without your encouragement, support, and understanding. I have missed several rounds of board games, trips to the play area, bed-time routines, and more. I promise you that I will do the best to make up for the lost time. Thank you for everything.
— Ajoy Krishnamoorthy
I WOULD LIKE TO ACKNOWLEDGE THE HELP, advice, and assistance from the people both inside and
outside the Visual Studio team at Microsoft. Special thanks go to Aaron Hallberg, Brian Randell, Buck Hodges, Clark Sell, Jim Lamb, Julie MacAller, Mario Rodriguez, Matthew Mitrik, and William Bartholomew, without whom my contributions to this book would not have been possible.
Thanks also to Rob Caron, Jeff Beehler, Brian Harry, Doug Neumann, Eric Sink, and Corey Steffen for encouraging my involvement in the Visual Studio community over the past fi ve years. I would like to thank my co-authors for bringing me into this project, and for helping me fulfi ll a lifetime ambition of writing a book. I would also like to thank my dad, Roy Woodward, and my much missed mum, Val Woodward. They got me started down this whole computing path by getting me a Vic-20 at the age of 6, and got me a typewriter at the age of 8. With that sort of start, you’d think I’d have written a computer book at the age of 10, but instead I re-wrote “Ghostbusters” and co-authored a novel about a pink sofa. Well Mum — I got there in the end. Last but not least, I would also like to thank my wife, Catherine, for her encouragement and support, and for helping me fi nd the time to write this book in our already busy lives. She has heard the phrase, “I’m nearly done, just fi nishing this last bit up,” more times than anyone deserves, yet, bizarrely, has still not fi gured out that she is way out of my league.
— Martin Woodward
CONTENTS
INTRODUCTION xxix
PART I: ARCHITECT CHAPTER 1: INTRODUCTION TO SOFTWARE ARCHITECTURE
3 Designing Visually
3 Microsoft’s Modeling Strategy
4 Understanding Model-Driven Development
5 Understanding Domain-Specifi c Languages
6 From Objects to Services
7 Understanding Objects and Compile-Time Reuse
7 Understanding Components and Deploy-Time Reuse
8 Understanding Distributed Components and Run-Time Reuse
9 Distributed Services and the Service-Oriented Architecture
10 New Architecture Tools in Visual Studio 2010 Ultimate
10 Use Case Diagrams
11 Activity Diagrams
11 Sequence Diagrams
12 Component Diagrams
13 Class Diagrams
13 Layer Diagrams
13 Architecture Explorer
14 Summary 15
CHAPTER 2: TOP-DOWN DESIGN WITH USE CASE DIAGRAMS, ACTIVITY DIAGRAMS, AND SEQUENCE DIAGRAMS
17 Use Case Diagrams
18 Understanding a Use Case Diagram
18 Use Case Diagram Toolbox
20 Creating a Use Case Diagram
20 Activity Diagrams
22 Understanding an Activity Diagram
22 Activity Diagram Toolbox
25
CONTENTS Creating an Activity Diagram
26 Adding an Activity Diagram to a Use Case Diagram
27 Sequence Diagrams
28 Understanding Sequence Diagrams
28 Sequence Diagram Toolbox
29 Creating a Sequence Diagram
30 Summary 31
CHAPTER 3: TOP-DOWN DESIGN WITH COMPONENT AND CLASS DIAGRAMS
33 Component Diagrams
34 Understanding a Component Diagram
34 Component Diagram Toolbox
36 Component Diagram Element Properties
37 Creating a Component Diagram
38 Showing Internal Component Parts
43 Class Diagrams
46 Understanding a Class Diagram
47 Class Diagram Toolbox
48 Class Diagram Type Properties
49 Class Diagram Attribute Properties
51 Class Diagram Operations Properties
52 Class Diagram Association Properties
53 Creating a Class Diagram
55 Summary 58
CHAPTER 4: ANALYZING APPLICATIONS USING ARCHITECTURE EXPLORER
59 Understanding the Code Base
60 Architecture Explorer Basics
61 Understanding the Architecture Explorer Window
61 Architecture Explorer Options
62 Navigating Through Architecture Explorer
62 Exploring Options for Namespaces
64 Exploring Options for Classes
66 Exploring Options for Members
68 Architecture Explorer Queries
69 Dependency Graphs
71 Creating the First Dependency Graph
71 Creating a Dependency Graph without Architecture Explorer
73 Navigating Through Your Dependency Graph
74 Dependency Graph Legend
77 xvi
CONTENTS Dependency Graph Toolbar
78 Summary 80
CHAPTER 5: USING LAYER DIAGRAMS
81 Creating a Layer Diagram
82 Defi ning Layers on a Layer Diagram
83 Creating a Layer for a Single Artifact
84 Adding Multiple Objects to a Layer Diagram
84 The Layer Explorer
85 Defi ning Dependencies
86 Validating the Layer Diagram
88 Layer Diagrams and the Build Process
90 Summary 91
PART II: DEVELOPER CHAPTER 6: INTRODUCTION TO SOFTWARE DEVELOPMENT
95 What’s New for Developers in Visual Studio 2010
96 Test Impact Analysis
97 Improved Code Analysis
97 Profi ler Enhancements
97 Database Extensibility
97 Advanced Debugging with IntelliTrace
98 Improved “Test-First” Development Experience
98 Summary 98
CHAPTER 7: UNIT TESTING WITH THE UNIT TEST FRAMEWORK
99 Unit Testing Concepts 100
Benefi ts of Unit Testing 100 Writing Eff ective Unit Tests
101 Third-Party Tools 102
Visual Studio Unit Testing 102
Creating Your First Unit Test 103 Managing and Running Unit Tests 106
Test Run Confi guration 108 Test Results 109 Debugging Unit Tests 109
Programming with the Unit Test Framework 110 Initialization and Cleanup of Unit Tests 110 Using the Assert Methods
113 xvii
CONTENTS Using the CollectionAssert class 116 Using the StringAssert class
118 Expecting Exceptions 119 Defi ning Custom Unit Test Properties 119
TestContext Class 120 Creating Data-Driven Unit Tests 121
Accessing Nonpublic Members from Tests 122 Using PrivateObject to Access Nonpublic Instance Members 123 Using PrivateType to Access Nonpublic Static Members 125
Code Generation 126
Generating Tests from Code 126
Code Coverage 129
Enabling Code Coverage 130 Viewing Code Coverage Results 130
Test Impact Analysis 131
Prerequisites for Test Impact Analysis 132 Identifying Relationships Between Code and Tests 133 Test Impact Analysis Example 133
Summary 137
CHAPTER 8: MANAGED CODE ANALYSIS AND CODE METRICS 139 The Need for Analysis Tools 140 Using Managed Code Analysis 140
Built-in Managed Code Analysis Rules 142 Code Analysis Rule Sets 143 Enabling Managed Code Analysis 144
Executing Static Code Analysis 146 Working with Rule Violations 147
Using the Command-Line Analysis Tool 151 FxCopCmd Options
151 FxCopCmd Project Files 154 Build Process Code Analysis Integration 155
Creating Code Analysis Rules 155 Refl ection and Introspection
155 Creating a New Rule 156
Code Metrics 163 Summary 165
CHAPTER 9: PROFILING AND PERFORMANCE 167 Introduction to Performance Analysis 168 xviii
CONTENTS Types of Profi lers
168 Visual Studio Profi ling 169
Using the Profi ler 169
Creating a Sample Application 169 Creating a Performance Session 171 Using the Performance Explorer 173 Confi guring a Sampling Session 182 Confi guring an Instrumentation Session 184 Confi guring a .NET Memory Allocation Session 184 Confi guring a Concurrency Profi ling Session 185 Executing a Performance Session 185 Managing Session Reports
186 Reading and Interpreting Session Reports 187 Command-Line Profi ling Utilities 195
Virtual Machines 196 Profi ling JavaScript 196 Just My Code
198 Common Profi ling Issues
198 Debugging Symbols
198 Instrumentation and Code Coverage 199 Summary 199
CHAPTER 10: DATABASE DEVELOPMENT, TESTING, AND DEPLOYMENT 201 The Challenges of Database Change Management 202 Offl ine Schema Development 203 Taking the Schema Offl ine
204 Iterative Development 204 Schema Testing 205 Build and Deploy 206
Creating a Database Project 207 Examining the Database Project 212 Solution Explorer versus Schema View 213 Schema Dependency Viewer
213 T-SQL File Structure 214
Making Schema Changes 215
Editing T-SQL Files Directly 216 Detecting Schema Syntax Errors 216
Database Refactoring 217 T-SQL Script Templates
220 Deploying Database Changes 221 xix
CONTENTS Data Generation 224
Data Generation Plan 224 Data Generators
226 Database Testing
227 Functions, Triggers, and Stored Procedures 227 Writing Advanced Database Unit Tests 230 Eff ective Database Testing
231 T-SQL Static Analysis 233 Additional Database Tools
236 Summary 241
CHAPTER 11: INTRODUCTION TO INTELLITRACE 243 Debugging Using IntelliTrace 243 Debugging Options 244 Events Recording
247 Debugging and Playback 248
New Features in Breakpoints 251 Sharing Breakpoints
251 Labeling Breakpoints 252
Pinnable Data Tips 253 Summary 255
PART III: TESTER CHAPTER 12: INTRODUCTION TO SOFTWARE TESTING 259 Role-Based Testing Tools 260 Types of Tests 260 Diagnostic Data Adapters 262 Microsoft Test Manager 264 Managing Automated Tests with Visual Studio 265
Test Projects 265 Using Test Categories
267 Working with Test Results 269 Using Ordered Tests
272 Test Settings 274 Test Impact View
275 Summary 276
CHAPTER 13: WEB PERFORMANCE AND LOAD TESTING 277 Web Performance Tests 278 xx
CONTENTS Web Performance Tests Versus Coded UI Tests 278 Creating a Sample Web Application 279 Creating Users for the Site
279 Creating and Confi guring Web Tests 281 Recording a Web Performance Test 282 Confi guring Web Performance Test Run Settings 284 Parameterizing the Web Server 285 Test Settings
285 Running a Web Performance Test 287 Observing Test Execution and Results 287 Editing a Web Performance Test 289 Data-Driven Web Performance Tests 293 Coded Web Performance Tests 294
Load Tests 297
Creating and Confi guring Load Tests 297 Editing Load Tests 306 Executing Load Tests 308 Viewing and Interpreting Load Test Results 308
Command-Line Test Execution 312 Executing Tests
313 Executing Test Lists 313 Other Test Options 313
Distributed Load Tests 313
Installing Controllers and Agents 314 Confi guring Controllers 314 Confi guring Agents 315 Test Settings 315 Running a Distributed Load Test 316
Viewing a Distributed Load Test 317 Summary 317
CHAPTER 14: MANUAL TESTING 319 Microsoft Test Manager
319 Using Test Plans 320
Confi guring Test Settings 322 Using Builds 323 Analyzing Impacted Tests 324 Defi ning Test Confi gurations 325 Using Plan Contents 326
Running Tests and Tracking Results 330 Using Microsoft Test Runner
332 xxi
xxii CONTENTS Supported Technologies
335 Saving Test Results 335
Running Automated Tests 336 Summary 338
CHAPTER 15: CODED USER INTERFACE TESTING 339 Creating Coded UI Tests Using the Coded UI Test Builder 340 Setting up the Sample Application 340 Create a Test Project 341 Add a Coded UI Test 341 Coded UI Test Builder
342 Generated Code 345 Running Your Test
347 Creating a Data-Driven Test 347 Using the using() Clause
349 Enhanced Assertion Reporting 350 Creating Coded UI Tests Using Action Recordings 351 Supported Technologies
354 Summary 354
CHAPTER 16: LAB MANAGEMENT 357 Lab Management Infrastructure 358 Golden Images 359 Agents 359
Virtual Environments 360 Testing with Virtual Environments 366
Create New Test Settings 366 Run Manual Tests with an Environment 369
Automated Build-Deploy-Test with Virtual Environments 371 Physical Environments 375 Summary 376
PART IV: TEAM FOUNDATION SERVER CHAPTER 17: INTRODUCTION TO TEAM FOUNDATION SERVER 379 What Is Team Foundation Server? 380 Team Foundation Server Core Concepts 380 Team Foundation Application Tier 381 Team Project Collection 381
CONTENTS Team Project
382 Process Template 385 Work Item Tracking
387 Version Control 388 Team Build
391 Accessing Team Foundation Server 392
Accessing Team Foundation Server from Visual Studio 392 Using the Team Foundation Server Administration Console 394 Accessing Team Foundation Server through a Web Browser 395 Using Team Foundation Server in Microsoft Excel 395 Using Team Foundation Server in Microsoft Project 397 Command-Line Tools for Team Foundation Server 397 Accessing Team Foundation Server from Eclipse 398 Windows Explorer Integration with Team Foundation Server 399 Access to Team Foundation Server via other Third-Party Integrations 400
What’s New in Team Foundation Server 2010 400 Project Management
400 Version Control 401 Build 401
Administration 402 Adopting Team Foundation Server 402
Hosting Team Foundation Server 402 Adoption Plan 403
Summary 404
CHAPTER 18: TEAM FOUNDATION ARCHITECTURE 405 Team Foundation Server Logical Architecture 406 Team Project Collections
408 Team Foundation Server Farm 410 Team Foundation Server Application 410 Team Foundation Server Instance 411
Physical Architecture 412
Hardware Requirements 412 Software Requirements
414 Deployment Scenarios
415 Individuals and Small Teams
416 Small Shops 416 Large Enterprises
417 Hosted Environments 418 Upgrading from Older Team Foundation Server Versions 420
Summary 421 xxiii
CONTENTS
CHAPTER 19: TEAM FOUNDATION VERSION CONTROL 423 Team Foundation Version Control and Visual SourceSafe (VSS) 2005 424 Setting up Version Control 425
Setting up Security Roles 425 Setting up Your Workspace 426
Using the Source Control Explorer 427 Workspaces 429 Adding Projects to the Source Repository 432
Check-In and Check-Out 432
Checking In an Item 433 Checking Out an Item 434 Creating and Administering Check-In Policies 435
Viewing History 436 Labeling Files
437 Shelving 438 Branching and Merging
440 Branching 440 Merging 443
Command-Line Tools 444 Summary 445
CHAPTER 20: BRANCHING AND MERGING 447 Understanding Branching and Merging 448 Software Confi guration Management 448 Basic Defi nitions 449
Common Branching Strategies 449 No Branching
449 Branch Per Release 450 Code Promotion Branching
451 Branch Per Feature 451
Basic Branching Plan 452
Scenario 453 The Plan 453 Implementation 454
Advanced Branching Plan 467
Scenario 468 The Plan 468 Implementation 469
Summary 470 xxiv
CONTENTS
CHAPTER 21: TEAM FOUNDATION BUILD 471 Team Foundation Build
472 What’s New in Team Foundation Build 2010 474 Windows Workfl ow 4.0
474 Gated Check-ins 475 Private Builds 475 Build Controller 475 Build Notifi cations 476 Properties Exposed for Common Customizations 476
Integration with Symbol and Source Server 476 Enhanced Build Deletion Options 477 Team Foundation Build Architecture 477 Working with Builds
478 Team Explorer
479 Build Explorer 479 Build Details View
481 Creating a Build Defi nition 482 Queuing a Build
489 Build Notifi cations 491
Team Build Process 492
DefaultTemplate Process 493 Build Process Parameters 494 Customizing the Build Process 500
Summary 517
PART V: PROJECT/PROCESS MANAGEMENT CHAPTER 22: INTRODUCTION TO PROJECT MANAGEMENT 521 Team Project Setup and Confi guration 522 Creating a Team Project 523 Connecting to the Team Foundation Server 527
Planning Your Project 528 All Things Work Items 529
Understanding a Work Item 529 Work Item Links and Link Types 531
Creating and Updating Work Items 534 Work Item Queries 535
Using MS Offi ce with Team Foundation Server 538 Offi ce Project and Team Foundation Server 539 Offi ce Excel and Team Foundation Server 544
Summary 547 xxv
CONTENTS
CHAPTER 23: PROCESS TEMPLATES 549 Understanding a Process Template 550 Process Templates Out of the Box 551 MSF for Agile Software Development 551 MSF for CMMI Process Improvement v5.0 562 Partner and Community Templates 568 Summary 569 CHAPTER 24: USING REPORTS, PORTALS, AND DASHBOARDS 571 Team Foundation Server Reporting 572 Working with Team Foundation Server Reports 575 Tools to Create Reports 575 Working with Microsoft Excel Reports 576
Working with RDL Reports 585 Reports Out-of-the-Box 589 Project Portals and Dashboards 592
Summary 596
CHAPTER 25: AGILE PLANNING USING PLANNING WORKBOOKS 599 Product Backlog 600
Release Planning 600
Product Planning Workbook 602 Locating the Product Planning Workbook 602 Setting Up the Product Planning Workbook 602 Using the Product Backlog Worksheet 603 Using the Iterations Worksheet 606 Using the Interruptions Worksheet 607
Iteration Planning 607 Iteration Backlog Workbook 608
Locating the Iteration Backlog 608 Using the Iteration Backlog Worksheet 610 Using the Capacity Planning Worksheet 612
Tracking the Iteration 613
Issues 613 Retrospectives 614 Summary 614 xxvi
CHAPTER 26: PROCESS TEMPLATE CUSTOMIZATIONS 615 Customizing Process Templates 616 Downloading a Process Template to Your Desktop 616 What’s in a Process Template? 617 Process Template Plug-ins
xxvii CONTENTS
618 Tools for Customization
620
XML Editor 620 witadmin Command-Line Utility 621
Process Template Editor 622
Uploading Process Templates in Team Foundation Server 631 Deleting Process Templates 631 Customizing Process Guidance 632 Summary 632
INDEX 633
INTRODUCTION
IN JUNE 1999, MICROSOFT STARTED TO RE - EVALUATE HOW Visual Studio was being used as part
of the software development process. Microsoft was continuing to serve the needs of an individual programmer through the highly productive “ code - focused rapid - application - development ” features of Visual Studio, but wasn ’ t doing much to help programmers work together as a team . And what about software architects — how should they be working with the programming team? And testers? Project managers? Many teams had begun to set up their own solutions using a mixture of third - party, in - house, and vendor - provided tools to address such challenges as version control, bug tracking, and team communications. But this mishmash of tools can be tricky to set up and maintain, and even more diffi cult to integrate. Microsoft sought to address this challenge by providing an integrated set of tools designed to address the needs of the entire software development team. Thus, Visual Studio Team System was born, and was fi rst released with the Visual Studio 2005 product line.
Team System was built from a foundation of tools and technologies that Microsoft had been using internally for many years to build some of the most complex software projects ever undertaken. Team System appealed not only to programmers, but to all members of the development team — architects, application developers, database developers, testers, and project managers. Team System was built to address the entire software development lifecycle, more broadly known as application lifecycle management .
Three years later, Visual Studio 2008 Team System evolved from the previous version to include even more tools and functionality for all members of the project team to use.
THE NAME CHANGE
Observant readers will notice that nowhere in the title of this book do the words “ Team System ” appear. And, other than in the brief history you just fi nished reading, you won ’ t see the words “ Team System ” listed anywhere else in this book. So, what happened to “ Team System ” ? Microsoft did some research and found that by creating two Visual Studio brand names, customers felt confused over the differences between the products. “ Visual Studio ” had been positioned as the basic tool for developers to use, while “ Visual Studio Team System ” was positioned as a set of tools for software development teams. However, almost all professional developers work on teams, and, hence, the term “ Team System ” was somewhat meaningless. So, the decision was made to drop the “ Team System ” name, and consolidate everything around a united Visual Studio brand family.
There are other somewhat subtle reasons for this change as well. However, the long and short of it is that, in the 2010 product lineup, the “ Team System ” brand no longer exists, but the products and technologies are still there (and better than ever).
INTRODUCTION
VISUAL STUDIO 2010 PRODUCT LINEUP Table I - 1 outlines the new product lineup for Visual Studio 2010.
TABLE I - 1: Visual Studio 2010 Product Lineup
PRODUCT NAME DESCRIPTION
Microsoft Visual Studio 2010 Ultimate with The comprehensive suite of application MSDN lifecycle management tools for software teams to help ensure quality results from design to deployment.
Microsoft Visual Studio 2010 Premium with A complete toolset to help developers deliver MSDN scalable, high - quality applications. Microsoft Visual Studio 2010 Professional with The essential tool for basic development tasks MSDN to assist developers in implementing their ideas easily. Microsoft Visual Studio Test Professional 2010 The primary tool for manual and generalist with MSDN testers who need to defi ne and manage test cases, execute test runs, and fi le bugs. The Test Professional product includes Microsoft Test Manager, which is introduced in Chapter 14. Microsoft Visual Studio Team Foundation The server component for team development, Server 2010 version control, work item tracking, build automation, and reporting. Microsoft Visual Studio Lab Management 2010 The tools to support virtual labs, and enable better developer and tester collaboration when paired with other Visual Studio tools.
Visual Studio 2010 Premium contains all the functionality of Visual Studio 2010 Professional, and Visual Studio 2010 Ultimate contains all the functionality of Visual Studio 2010 Premium. Visual Studio 2010 Ultimate also includes all of the functionality available in Visual Studio Test Professional 2010.
Table I - 2 provides a detailed look at the functionality contained within each Visual Studio 2010 edition:
xxx
INTRODUCTION TABLE I-2: Visual Studio 2010 Editions
VISUAL STUDIO EDITION FUNCTIONALITY
Microsoft Visual Studio 2010 Ultimate IntelliTrace Unifi ed Modeling Language (UML) Architecture Explorer Logical class designer Test case management Manual testing Test record and playback Layer diagrams Web performance testing Load testing
Microsoft Visual Studio 2010 Premium Coded user interface (UI) testing Performance profi ling Code coverage Database change management Database unit testing Test impact analysis
Static code analysis Code metrics Database deployment Test data generation
Microsoft Visual Studio 2010 Professional Silverlight development Web development Windows Presentation Foundation (WPF) development
continues xxxi
INTRODUCTION TABLE I-2 (continued)
VISUAL STUDIO EDITION FUNCTIONALITY
Multi - core development Cloud development Windows Forms development Offi ce development Customizable IDE
This book focuses on the functionality contained in Visual Studio 2010 Premium and Visual Studio 2010 Ultimate.
MODERN SOFTWARE DEVELOPMENT CHALLENGES
Software developers share common challenges, regardless of the size of their teams. Businesses require a high degree of accountability — software must be developed in the least amount of time, with no room for failure. Some of these challenges include the following:
Integration problems — Most tools commonly used by software development teams come ➤
from third - party vendors. Integrating with those tools can pose a major challenge — in many cases, it requires duplicating or copying data into multiple systems. Each application has a learning curve, and transmitting information from one application to another (incompatible) application can be frustrating and time - consuming.
Geographically distributed teams — Many development and management tools don ’ t scale ➤
for geographically distributed teams. Getting accurate reporting can be diffi cult, and there is often poor support for communication and collaborative tools. As a result, requirements and specifi cations can be mapped incorrectly, causing delays and introducing errors. Global teams require solid design, process, and software confi guration management all integrated into one package. There aren ’ t many software packages that can deliver all these features, and those that do exist tend to be incredibly expensive.
Segmentation of roles — Specialization can be a huge problem on a team. Experts can ➤
assume that other departments are aware of information that doesn ’ t end up in the status reports, but may greatly affect the project as a whole. Interdepartmental communication is a huge and prevalent challenge.