Download Resources from this meeting - NYC VSTS User Group

58
VSTS Developers edition Presenter: Navneet Srivastava Lead architect and Manager Emerging Health Information Technology 02/19/22 Visual Studio 2008

Transcript of Download Resources from this meeting - NYC VSTS User Group

Page 1: Download Resources from this meeting - NYC VSTS User Group

VSTS Developers edition

Presenter: Navneet SrivastavaLead architect and Manager Emerging Health Information Technology

05/01/23

Visual Studio 2008

Page 2: Download Resources from this meeting - NYC VSTS User Group

Introduction Editions Rapid Application Development Code Quality Effective Team Collaboration Breakthrough User Experiences The Future Questions?

05/01/23

Page 3: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Page 4: Download Resources from this meeting - NYC VSTS User Group

Microsoft® Visual Studio® 2008 delivers on Microsoft’s vision of smart client applications by enabling developers to rapidly create connected applications that deliver the highest quality, rich user experiences.

With Visual Studio 2008, organizations will find it easier than ever before to capture and analyze information to help them make effective business decisions.

Visual Studio 2008 enables organizations of every size to rapidly create more secure, manageable, and reliable applications that take advantage of Windows Vista™ and the 2007 Office system.

05/01/23

Page 5: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Page 6: Download Resources from this meeting - NYC VSTS User Group

Architect Edition. Developer Edition. Database Edition. Test Edition. Team Foundation.

05/01/23

Page 7: Download Resources from this meeting - NYC VSTS User Group

Feature Area Architect Database Development Test Team

Application Designer

System Designer

Logical Datacenter Designer

Deployment Designer

Settings and Constraints Editor

05/01/23

EditionsEditions:

to visually define service-oriented applications and generate code

to compose applications into systems or reusable subsystems and validate the resulting configurations

to visualize the logical structure of datacenters, specify operational policies and validate applications before deployment

to validate application designs against a target datacenter and identify issues before deployment begins

to specify requirements on the hosting environment in the Application Designer, or to specify constraints of the hosting environment in the Logical Datacenter Designer

Page 8: Download Resources from this meeting - NYC VSTS User Group

Feature Area Architect Database Development Test Team

Database Project

Offline Database Schema

Database Unit Testing

Data Generation

Database Refactoring

05/01/23 Continued..

EditionsEditions:

with source control integration of all database objects for an offline representation of a database schema, which contains the object definitions and deployment scripts that you would need to create a separate instance of that database or to update an existing instance

to make database schema changes in an isolated development environment

to establish a baseline state for your database and then to verify any subsequent changes you make to database objects

to fill a test database with test data that is appropriate for the schema of the database but unrelated to the production data

to automatically update references to renamed database schema objects

Page 9: Download Resources from this meeting - NYC VSTS User Group

Feature Area Architect Database Development Test Team

Schema Compare

Data Compare

Database Schema Build & Deployment

T-SQL Editor

Advanced Database Tools

05/01/23

EditionsEditions:

to compare the schemas of two databases and then decide whether to apply some or all schema objects from the source to the target

to compare the data between two databases that have the same schema

to deploy a new database, or changes to an existing database, from your database project to a database server

to modify definitions of database objects such as tables, views, indexes, stored procedures, etc.

to validate SQL syntax, execute database queries and scripts, and examine result sets

Page 10: Download Resources from this meeting - NYC VSTS User Group

Feature Area Architect Database Development Test Team

Code Metrics

Managed Code Analysis Tool

C/C++ Code Analysis Tool

Code Analysis Check-In Policy

05/01/23

EditionsEditions:

to identify complex, difficult to maintain, and error-prone code by measuring class coupling, depth of inheritance, cyclomatic complexity, lines of code, and a maintainability index

to analyze managed assemblies and reports information about the assemblies, such as violations of the programming and design rules set forth in the Microsoft .NET Framework Design Guidelines

to identify possible defects in C/C++ source code caused by common coding errors, such as buffer overruns, un-initialized memory, null pointer dereference, memory and resource leaks

to requires that code analysis is run prior to check-in

Page 11: Download Resources from this meeting - NYC VSTS User Group

Feature Area Architect Database Development Test Team

Profiling Tool

Stand Alone Profiler

Application Verifier

05/01/23

EditionsEditions:

to detect application performance bottlenecks using lower-overhead sampling for relative performance data, or higher-overhead instrumentation for more exact measurement

to analyze application performance in the absence of the Visual Studio development environment

to quickly find subtle programming errors in C++ applications that can be extremely difficult to identify with normal application testing, such as errors caused by heap corruption, incorrect handle and critical section usage

Page 12: Download Resources from this meeting - NYC VSTS User Group

Feature Area Architect Database Development Test Team

Unit Testing

Code Coverage

Web Tests

Load Tests

Manual Tests

Generic Tests

Ordered Tests

Test List Editor

Testing Check-In Policy

05/01/23

EditionsEditions:

to test the functionality of Web applications using a series of HTTP requests

to create tests that are difficult or impossible to automate, such as when the connection between the computer and its power supply is interrupted, or when you want to test for user interface details or behavior, or to refine or examine your test environment at a specific point in the testing processto wrap external programs and tests that were not originally developed for use in the Team System testing toolsto execute a series of tests in a particular order and manage that series as a single testto logically group tests and then work with those tests as groups instead of individually for improved test case management

to require that check-in tests (defined with a test list) are run prior to check-in

to exercise source code by directly calling the methods of a class, passing appropriate parameters, and test the values that are produced against expected values (now available in Visual Studio 2008 Professional Edition)

to measure the effectiveness of tests on a line-by-line or even a block-by-block basis

to run a series of Web tests or unit tests, which operate under multiple simulated users over a period of time, for both performance and stress tests .

Page 13: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Page 14: Download Resources from this meeting - NYC VSTS User Group

Multi-Targeting Support. Web Designer and CSS Support. ASP.NET AJAX and JavaScript Support. Project Designer. Data LINQ and Entity Support

05/01/23

Rapid Application DevelopmentRapid Application Development:

Page 15: Download Resources from this meeting - NYC VSTS User Group

Visual Studio will now support targeting multiple versions of the .NET Framework

Users can pick to choose the version of framework they would like to choose to build the application.

Upon Changing on the target framework version , the IDE will update its compilers and applications to use a new version of the .NET Framework.

The present release supports 2.0 , 3.0 and 3.5. Project Templates are based on the Target Framework.

Once created , the project can later be upgraded.

05/01/23

Rapid Application DevelopmentRapid Application Development:

Page 16: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Rapid Application DevelopmentRapid Application Development:

Page 17: Download Resources from this meeting - NYC VSTS User Group

Web Site Views : Design , Split , Code. Split View. CSS Source View. CSS and HTML intellisense. Outlining and Formatting.

05/01/23

Rapid Application DevelopmentRapid Application Development:

Page 18: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Rapid Application DevelopmentRapid Application Development:

Page 19: Download Resources from this meeting - NYC VSTS User Group

Transparent Intellisense. Organize C# using statements. JavaScript Intellisense. JavaScript Debugging.

05/01/23

Rapid Application DevelopmentRapid Application Development:

Page 20: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Rapid Application DevelopmentRapid Application Development:

Page 21: Download Resources from this meeting - NYC VSTS User Group

IDE and Project Designer◦ WPF◦ Silverlight◦ Business Intelligence◦ Workflow Applications◦ EDMX Designer

05/01/23

Rapid Application DevelopmentRapid Application Development:

Page 22: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Rapid Application DevelopmentRapid Application Development:

Page 23: Download Resources from this meeting - NYC VSTS User Group

ORM LINQ Language Enhancements Support.

05/01/23

Rapid Application DevelopmentRapid Application Development:

Page 24: Download Resources from this meeting - NYC VSTS User Group

ORM LINQ Language Enhancements Support.

05/01/23

Rapid Application DevelopmentRapid Application Development:

Page 25: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Page 26: Download Resources from this meeting - NYC VSTS User Group

Code Analysis. Unit Testing. Code Profiling. Code Coverage

05/01/23

Code QualityCode Quality:

Page 27: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Page 28: Download Resources from this meeting - NYC VSTS User Group

Also known as “Static Code Analysis” Wikipedia says…

“Code analysis is the term applied to the analysis of computer software that is performed without actually executing programs built from that software…”

Implemented via tool to analyze and report information about the assemblies

05/01/23

Code QualityCode Quality:

Page 29: Download Resources from this meeting - NYC VSTS User Group

Serves as a preventive measure Automates initial “code review” Built-in corrective guidance Easy to use, fully integrated Available for both managed and native code

05/01/23

Code QualityCode Quality:

Page 30: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Page 31: Download Resources from this meeting - NYC VSTS User Group

Use it to help you write consistent code Enforce standards through code analysis Make it part of all your automated builds Extend it through custom rules Use it often!

05/01/23

Code QualityCode Quality:

Page 32: Download Resources from this meeting - NYC VSTS User Group

At the Team Project level◦ Team | Team Project Settings | Source Control…

menu◦ Check-in Policy tab◦ Code Analysis check-in policy

At the Project level◦ Website projects

Website | Code Analysis Configuration… menu◦ All other projects

Project | [Project Name] Properties… menu Code Analysis tab

05/01/23

Code QualityCode Quality:

Page 33: Download Resources from this meeting - NYC VSTS User Group

Is the warning message explicit enough? If not clear, what can we do?

Use rule code (e.g. CA1304) Get corresponding caption (e.g. Globalization

Rules, CA1304: Specify CultureInfo) Look online reference for details (

http://msdn.microsoft.com/en-us/library/ms182189.aspx)

05/01/23

Code QualityCode Quality:

Page 34: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Page 35: Download Resources from this meeting - NYC VSTS User Group

Tests the smallest amount of a system Designed for testing method calls at the source

code level No configuration or external dependencies Can be used in conjunction with code coverage

for analysis of code once the tests have executed

05/01/23

Code QualityCode Quality:

Page 36: Download Resources from this meeting - NYC VSTS User Group

Improves maintainability Helps maintain long term quality of application Helps validate and enforce contracts Helps define the system Developers write the tests Provides mechanism for regression testing

05/01/23

Code QualityCode Quality:

Page 37: Download Resources from this meeting - NYC VSTS User Group

Available to developers and testers Fully integrated with Visual Studio IDE Provides simple migration path from prior

frameworks such as NUnit Support for data driven testing via integration

with database to supply test data

05/01/23

Code QualityCode Quality:

Page 38: Download Resources from this meeting - NYC VSTS User Group

Writing good unit tests is hard to do Requires insight and experience Can be a frustrating experience at first Increases initial development costs

I don’t know what to test!?!

05/01/23

Code QualityCode Quality:

Page 39: Download Resources from this meeting - NYC VSTS User Group

Test structures identified through .NET attributes: ◦ TestClass◦ TestMethod◦ ClassInitialize/ClassCleanup◦ TestInitialize/TestCleanup ◦ ExpectedExceptionAttribute

05/01/23

Code QualityCode Quality:

Page 40: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

[ProjectName].vsmdi – contains the definition of the test.

LocalTestRun.testrunconfig – test run configuration file

AuthoringTests.txt – contains general information about testing

ManualTest1.mht – a template-type ManualTest for adding functional test descriptions to your project

UnitTest1.cs – Blank unit test

Page 41: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Created in a separate test project Can be created contextually at either

Project, file, or method level

Page 42: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Consider using descriptive names that define◦ The module being tested◦ Method being tested◦ Scenario being tested◦ E.g. <Module>_<Method>_<Scenario>

Package unit tests to follow the structure of the module being tested

Page 43: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Test framework creates “accessor” assembly regardless of whether or not private methods are available

Test framework uses reflection to support testing private and internal methods

Nothing special you have to do in your part

Page 44: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Allow unit testing of major part of application Tests must be deterministic (repeatable) Tests must be automated Tests must be efficient (execute quickly) Write unit tests before or in parallel with

production code

Better to write and run incomplete tests than not to run any tests at all!

Page 45: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Web◦ i.e. testing web application’s authentication

mechanism Ordered

◦ Grouping individual authentication tests for execution in a specific order

Generic◦ Showing how to wrap an external test application

to integrate with Visual Studio

Page 46: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Page 47: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Also known as “Dynamic Code Analysis” Process of analyzing how code executes

and where majority of the time is spent Used to identify performance bottlenecks Load testing can be considered part of

profiling◦ Available in Team Suite or Tester editions only

Page 48: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Sampling◦ Interrupts the application at set intervals to

determine which function is executing◦ Used to examine performance for the entire

application Instrumentation

◦ Is more intrusive, inserts enter and exit “probes” into specific functions and tracks during execution

◦ Used to examine performance for specific modules

Page 49: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Start with either Sampling or Instrumentation

Use Sampling to identify bottlenecks Use Instrumentation to tackle specific

bottlenecks Use load to increase sampling size Analyze in sets of 3 or more

Page 50: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Page 51: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Helps you monitor your tests effectiveness Used to analyze source for specific missed

methods and branches Records which parts of an application's code

is being exercised by a specific test Team Members can analyze results at a

high-level

Page 52: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

Use code coverage to monitor your tests' effectiveness and completeness◦ Project managers can aggregate results as a

project status indicator◦ Team members can identify missed scenarios by

unit tests Set a high, but realistic target

Page 53: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

It is not a golden hammer Currently it is the dest quantifiable measure

of test completeness It doesn’t say a lot about test quality Beware of developer shortcuts

Page 54: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Code QualityCode Quality:

View results with a grain of salt Covered paths are based on test design

◦ E.g. if test is designed to touch 50% or code, then a 50% code coverage result yields 100% “real” coverage

Page 55: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Page 56: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Page 57: Download Resources from this meeting - NYC VSTS User Group

05/01/23

Page 58: Download Resources from this meeting - NYC VSTS User Group

05/01/23