Transcript
Page 1: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

http://bit.ly/MSCloudDay Date:27th April 2011 (Wednesday)Time: 9.00am to 5.00pm(registration starts at 9am)

Venue:Microsoft AuditoriumLevel 21, One Marina BoulevardNTUC Centre

Page 2: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Application Quality Best Practices with Visual Studio 2010

13 April 2011

Adrian Dunne | Microsoft Singapore ([email protected])

Page 3: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Microsoft Confidential3

The Cost of Sacrificing Quality

− $59 billion in lost productivity in the US

− 64% of this cost is born by “End Users”

− Software bugs account for 55% of all downtime costs

1 National Institute of Standards and Technology. (2002). Planning Report 02-3, The Economic Impacts of

Inadequate Infrastructure for Software Testing. U.S. Department of Commerce.

Page 4: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Strategy

Reduce time Unit Testing with Test Impact Analysis & Code Coverage Metrics

Enforce Coding Standards with Code Analysis & Code Metrics

Identify Performance Bottlenecks Before you’re Users with the Performance Wizard

Identify an Application’s limits with the Load Testing Framework

Page 5: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Microsoft Confidential5

Reduce time Unit Testing with Test Impact Analysis & Code Coverage

Metrics

Page 6: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Unit Test Improvements

Programmatically Control Unit Test Execution

Support for Categories (instead of lists) Performance Improvements Extensible with Custom Attributes Can Extend Unit Test Type Test Generation Test Data Generation

Page 7: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Test Impact Analysis Identifies tests impacted by code changes Significantly reduces test time

Page 8: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Microsoft Confidential8

DEMOTest Impact Analysis & Code

Coverage

Page 9: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Microsoft Confidential9

Enforce Coding Standards with Code Analysis & Code Metrics

Page 10: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Code Analysis

Process of examining code before runtime to eliminate defects and enforce standards

Code analysis != code review Reduce the man hours spent reviewing

typical coding errors, and spending more time on application design

Page 11: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Dogfooding

Design Globalization Interoperability

Maintainability

Mobility Naming Performance Portability

Reliability Security Usage

Page 12: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Project Health Metrics

“Code metrics provide the ability to dig deep to find those un-maintainable and complex hotspots”

Cyclomatic Complexity Lines of Code Class Coupling Depth of Inheritance Maintainability Index

Page 13: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Microsoft Confidential13

DEMOStatic Code Analysis &

Metrics

Page 14: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Microsoft Confidential14

Identify Performance Bottlenecks Before you’re Users with the

Performance Wizard

Page 15: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Performance Profiling

Measuring the execution of an application Assess your application performance

before deployment Identify & fix those areas that are

performing poorly

Page 16: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Profiling in the CLR

Profiling covers additional monitoring and diagnostics activities to support CLR features Application domains, garbage collection,

managed exception handling, and just-in-time (JIT) compilation

Page 17: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

So What’s New?

Tier Interaction Profiling (TIP) – Profile Database Interaction!

Check-in performance reports to use as a baseline for comparison

Capture performance data from automated tests

Page 18: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Microsoft Confidential18

DEMOPerformance Profiling

Page 19: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Microsoft Confidential19

Identify an Application’s limits with the Load Testing Framework

Page 20: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Options for automated tests− Visual Studio 2010 supports several kinds of

automated tests

DatabaseBusiness Logic

User Interface

DatabaseUnit Tests

T T T T T

Unit Tests

T T

T T T

T T

Web Performance

Tests

T

T

T

T

Coded UI Tests

T

T

Page 21: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Unlimited Load Testing

Web Performance

Tests

T

T

T

T

T

T

T

T

T

T

T

T

T

T

T

T

Test Agent

Test Agent

Test Agent

Test Agent

Test Controller

Page 22: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

DEMO

Microsoft Confidential22

Web Performance & Load Testing

Page 23: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

Microsoft Confidential23

QnA

Page 24: Application Quality Best Practices with Visual Studio 2010 - Adrian Dunne

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Visual Studio, the Visual Studio logo, and [list other trademarks referenced] are trademarks of the Microsoft group of companies.

 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.