Download presentation
Presentation is loading. Please wait.
Published byJeffrey Arnold Modified over 9 years ago
1
DEV302 - Visual Studio Team System Building Robust and Reliable Software Eric Lee Program Manager Microsoft Corporation
2
Development Teams Infrastructure Architect Solution Architect Project Manager Developer Tester End User
3
A day in the life … Write Code Write Unit Tests Review Work Run Code Analysis Operations! Developer
4
A day in the life … Write Code Write Unit Tests Review Work Run Code Analysis Operations! Developer Microsoft Research Internal Tools
5
Visual Studio Team System Change ManagementWork Item TrackingReportingProject Site Visual Studio Team Foundation Integration ServicesProject Management Process and Architecture Guidance Dynamic Code Analyzer Visual Studio Team Architect Static Code AnalyzerCode ProfilerUnit TestingCode CoverageVisio and UML ModelingTeam Foundation ClientVS ProClass ModelingLoad TestingManual TestingTest Case ManagementApplication ModelingLogical Infra. ModelingDeployment Modeling Visual Studio Team Developer Visual Studio Team Test Visual Studio Industry Partners
6
Visual Studio Team System Change ManagementWork Item TrackingReportingProject Site Visual Studio Team Foundation Integration ServicesProject Management Process and Architecture Guidance Visual Studio Industry Partners Dynamic Code Analyzer Visual Studio Team Architect Static Code AnalyzerCode ProfilerUnit TestingCode CoverageVisio and UML ModelingTeam Foundation ClientVS ProClass ModelingLoad TestingManual TestingTest Case ManagementApplication ModelingLogical Infra. ModelingDeployment Modeling Visual Studio Team Developer Visual Studio Team Test Dynamic Code AnalyzerStatic Code Analyzer Code Profiler Unit TestingCode Coverage
7
A day in the life … Write Code Write Unit Tests Review Work Run Code Analysis Operations! Developer
8
Test Driven Development Jim Newkirk
9
TDD Tenants Never write a single line of code unless you have a failing unit test Eliminate Duplication
10
Test List Task Based 4-8 hour duration 15-20 minute exercise at beginning Brainstorm a list of unit tests Do not get hung up on completeness, you can always add more later Describes completion requirements
11
Red/Green/Refactor Write a test for new capability Start Compile Fix compile errors Run the test And see it fail Write the code Run the test And see it pass Refactor as needed
12
Test Driven Development (TDD)
13
Recap Integrate testing into the development process Testability is a primary motivation during development The Visual Studio Team System provides an ideal environment for doing Test Driven Development
14
A day in the life … Write Code Write Unit Tests Review Work Run Code Analysis Operations! Developer
15
A day in the life … Write Code Write Unit Tests Review Work Run Code Analysis Operations! Developer
16
Code Coverage How effective are my unit tests? Am I done testing? Am I executing all the relevant parts of my application?
17
Code Coverage void PurchaseItem(int itemID) { if (itemID == 0) { throw new Exception(); } else { ProcessOrder(itemID); } UnitTest() { PurchaseItem(1); }
18
{ if (itemID == 0) { throw new Exception(); } else { ProcessOrder(itemID); } Code Coverage UnitTest() { PurchaseItem(1); } void PurchaseItem(int itemID)
19
{ throw new Exception(); } else { ProcessOrder(itemID); } void PurchaseItem(int itemID) if (itemID == 0) Code Coverage UnitTest() { PurchaseItem(1); }
20
{ throw new Exception(); } { ProcessOrder(itemID); } void PurchaseItem(int itemID) if (itemID == 0) Code Coverage UnitTest() { PurchaseItem(1); } else
21
{ throw new Exception(); } { ProcessOrder(itemID); } void PurchaseItem(int itemID) if (itemID == 0) Code Coverage UnitTest() { PurchaseItem(1); } else ProcessOrder(itemID);
22
{ throw new Exception(); } { ProcessOrder(itemID); } void PurchaseItem(int itemID) if (itemID == 0) Code Coverage UnitTest() { PurchaseItem(1); } else ProcessOrder(itemID); throw new Exception();
23
Visual Studio Team System Code Coverage
24
Predictability Effective testing Drives up quality Catch ‘blind spots’ right in Visual Studio
25
A day in the life … Write Code Write Unit Tests Review Work Run Code Analysis Operations! Developer
26
A day in the life … Write Code Write Unit Tests Review Work Run Code Analysis Operations! Developer
27
Code Analysis String path = “”; for (int i = 0; i < 100; i++) { path += “Value”; } return path;.EXE Intermediate Representation
28
Code Analysis String path = “”; for (int i = 0; i < 100; i++) { path += “Value”; } return path;.EXE Intermediate Representation Static Code Analysis
29
Code Analysis String path = “”; for (int i = 0; i < 100; i++) { path += “Value”; } return path;.EXE Intermediate Representation Application Verifier/Code Profiling
30
Static Code Analysis Bad code is syntactically correct Different naming conventions Manual code reviews can be inconsistent
31
Static Code Analysis Defects Security Performance Design Policy String path = “”; for (int i = 0; i < 100; i++) { path += “Value”; } return path;
32
Static Code Analysis Defects Security Performance Design Policy Intermediate Representation
33
Static Code Analysis DefectsSecurity Performance DesignPolicy Intermediate Representation
34
Static Code Analysis Don’t call String.Concat inside of loops Prefer StringBuilder String path = “”; for (int i = 0; i < 100; i++) { path += “Value”; } return path; for (int i = 0; i < 100; i++) { path.Append(Value”); } return path.ToString();
35
Visual Studio Team System Static Code Analysis
36
Catch bugs at their source Capable of complex analysis Leverages lessons learned Turn habit into ‘rules’
37
Application Verifier ‘Works on my machine’ ‘It used to work’ Runtime issues
38
Application Verifier Adventure Works DefectsSecurityLogoApp Compat
39
Visual Studio Team System Application Verifier
40
Catch critical errors at runtime Handle/Heap verification issues ‘Breaks’ into Visual Studio Team System at the source of the problem
41
Code Profiler Constant hardware updates Poor end-user experience Low throughput of transactions
42
Sampling Adventure Works Login() 1 Browse()1 Login() 1 Browse()2 Login() 1 Browse()3 Login() 1 Browse()4 Login() 1 Browse()5 Login() 1 Browse()5 Details()1 Login() 1 Browse()5 Details()1 CheckOut()1 Login() 1 Browse()5 Details()1 CheckOut()1 Logout()1
43
Sampling Adventure Works Login() 1 Browse()5 Details()1 CheckOut()1 Logout()1 Browse()5
44
Instrumentation Adventure Works
45
Instrumentation Basic Blocks Adventure Works
46
Instrumentation Basic Blocks Adventure Works Timing Probes
47
Instrumentation Adventure Works Browse() 10 ms Init() 20 ms Browse() 10 ms Init() 20 ms String.Concat() 5060 ms Browse() 10 ms Init() 20 ms String.Concat() 5060 ms Cleanup() 5 ms
48
Instrumentation Adventure Works Browse() 10 ms Init() 20 ms String.Concat() 5060 ms Cleanup() 5 ms String.Concat() 5060 ms
49
Visual Studio Team System Code Profiler
50
Do more with less Great customer experience
51
A day in the life … Write Code Write Unit Tests Review Work Run Code Analysis Operations! Developer
52
A day in the life … Write Code Write Unit Tests Review Work Run Code Analysis Operations! Developer
53
Avicode MOM Configuration Pack Wizard
54
Visual Studio Team System Change ManagementWork Item TrackingReportingProject Site Visual Studio Team Foundation Integration ServicesProject Management Process and Architecture Guidance Visual Studio Industry Partners Dynamic Code Analyzer Visual Studio Team Architect Static Code AnalyzerCode ProfilerUnit TestingCode CoverageVisio and UML ModelingTeam Foundation ClientVS ProClass ModelingLoad TestingManual TestingTest Case ManagementApplication ModelingLogical Infra. ModelingDeployment Modeling Visual Studio Team Developer Visual Studio Team Test Dynamic Code AnalyzerStatic Code Analyzer Code Profiler Unit TestingCode Coverage
55
Other Sessions DayTimeSessionTopic Tuesday12:15DEVPNL2 Visual Studio Team System Partners Tuesday1:30 DEV 300 Project Management Tuesday1:30 ARC 304 Bridging the Gap Between IT and Dev Tuesday3:15 ARC 400 Developing SOAs Wednesday8:30 DEV 301 Software Testing Thursday1:30 DEV 302 Advanced Development Thursday3:15 DEV 303 Enterprise-Class Source Control Friday9:00 ARC 312 Designing for Deployment Friday12:15DEVPNL5 Implementing Software Processes http://msdn.microsoft.com/vstudio/enterprise
56
Attend a free chat or web cast http://www.microsoft.com/communities/chats/default.mspx http://www.microsoft.com/usa/webcasts/default.asp List of newsgroups http://communities2.microsoft.com/ communities/newsgroups/en-us/default.aspx MS Community Sites http://www.microsoft.com/communities/default.mspx Locate Local User Groups http://www.microsoft.com/communities/usergroups/default.mspx Community sites http://www.microsoft.com/communities/related/default.mspx
57
Q1:Overall satisfaction with the session Q2:Usefulness of the information Q3:Presenter’s knowledge of the subject Q4:Presenter’s presentation skills Q5:Effectiveness of the presentation Please fill out a session evaluation on CommNet
58
© 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.