Date post: | 13-Dec-2014 |
Category: |
Business |
Upload: | dareen-alhiyari |
View: | 1,425 times |
Download: | 3 times |
Building Modern Applications with Microsoft Visual Studio 2010 and Team Foundation Server - Part II
Microsoft | Open Door
Dareen AlhiyariTechnology SpecialistSoftact – [email protected]
AgendaSource Code Version Control
Test-Driven Development and Unit Testing
Static Code Analysis
IntelliTrace
Building Code: Team Build
Demo
Summary
Questions
Part II
Source Code Version Control
Source Code Version Control• Changesets–Integrated Check-in–Check-in Policies
•Workspaces• Shelving
Key Concepts
Source Code Version Control
Other Concepts
• Labeling• Compare/Diff–Annotation
• Branching & Merging
ChangesetsLogical container of data related to check-in• File and branch information• Links to work items• Check-in notes• Comment• Policy compliance• Metadata (date, time, user)• Unit of atomic checkin
Uniquely identified• Numeric identifier• Incremental
Represents a point in time of source repository
Integrated Check-inAtomic• A changeset is guaranteed to have all changes from a check-in
Integrated• Check-in policy applied (but override-able)• Work Items associated• Builds associated with Work Items• Check-in notes• All related to changeset• Pending Check-in Window• Notification possibilities
Check-in Policy• Customizable, extensible
Check-in Policies• Requirements for Check-in• Overridable• Extensible
CommentsTestingWork Item AssociationCode AnalysisForbidden Files
Workspaces• Client side copy of source
retrieved from repository• Owned by one user on one
machine• Changes in workspace create
pending changes• Workspace mapping = Repository
folder mapped to local folder
ShelvingSet aside pending changes without checkin
Optionally revert to unmodified filesRestore shelved changes by “unshelving”Unshelve other user’s changes
Power of task branching with less overhead
Developer
Switch Tasks
Backup Work-In-Progress
Checkpoint Work-In-Progress
Share Work-In-Progress
Perform a Code Review
Scenarios
Version Control Integration with Other TFS Components
Build
Work Item
Tracking
Process Guidance & Automation
Portal & Reporting
Version Control
• Create various build scenarios• Build reports show associated changeset
• Easily associate code to work items• Provides traceability
Influences version control structure
Automatically impacts velocity, code churn
Tracking Bugs, Tasks & Other Work Items
Work Item Tracking Data Store
Main Functions:1. Add new or modify work items2. Attach files to work items3. Create links among work items4. Find or list a filtered set of work items
Each work item is assigned:• A unique ID• Work item type• State• Assigned To
Test-Driven Development
Intellectuals solve problems, geniuses prevent them
- Albert Einstein
No Test
How to Use
How to Implement
TDD
TestingDesign
Implement
Test
TDDDesign
Test
Implement
TDDDesign
Test
Implement
Test
TDDHow to do it• Design: figure out what you want to do• Test: write a test to express the design• It should FAIL• Implement: write the code• Test again• It should PASS
Time taken to fix bugs
Design Implementation QA Post-Release0
250
500
750
1000
Unit Testing
Automated UI TestingCoded UI testing enables you to automate user interface testing in Web and Windows‐based applications. These regression tests ensure that subsequent changes to the code do not break sections that already work.
Static Code Analysis
Just because it compiles, doesn’t mean it works!
Static Code Analysis
Static Code Analysis
IntilliTraceNO MORE “NO REPRO” BUGS−Rich & Actionable Bugs−Historical record of code
execution.−Like a DVR for debugging.−Examine actual code
execution.
IntilliTrace
Building Code
BUILD TARGETS
Clean
Get Source
Label
Compile
Run Tests
Drop Build Files
End to End Iteration
Build Error Build Break
Building CodeCommonly used targetsTarget Name Description
BeforeEndtoEndIteration Runs tasks before EndToEndIteration target. Use this to run something before the build starts.Example: Turn street light yellow.
AfterEndtoEndIteration Runs tasks after EndToEndIteration target. Use this to run something after the build successfully completes.Example: Copy Binaries and Config Files to MSI, Deploy MSI, Turn on Green Street Light
BeforeTest Called before tests are run.Example: Update or Prepare database or spreadsheet for Unit Tests
AfterOnBuildBreak Called after a work item is created when a build failsExample: Turn on Red Street Light
Demo
I'm a great believer in luck, and I find the harder I work the more I
have of it.
- Thomas Jefferson
SummaryTeam Foundation Server (TFS) is the collaboration platform at the core of Microsoft's application lifecycle management solution. TFS automates and streamlines the software delivery process, as well as provides full traceability and real‐time visibility into project status, for all team members, with powerful reporting tools and dashboards.
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction
and skillful execution; it represents the wise choice of many
alternatives.- William A. Foster
Thank You!
© 2010 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.