45
06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Embed Size (px)

Citation preview

Page 1: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

06 | Develop Customer Value with High Quality

Anthony Borton | ALM Consultant, Enhance ALMSteven Borg | Co-founder & Strategist, Northwest Cadence

Page 2: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

• Define code quality indicators

• Incorporate unit testing

• Develop code

• Validate quality

• Customize a team project

Module Overview

Page 3: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Click to edit Master subtitle style

Microsoft Virtual Academy

Define code quality indicators

Page 4: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

What the Study Guide says…

• Define code quality indicators– performing code review, including security and

performance analysis– analyzing code for common defects– calculating code coverage– performing architecture validation

Page 5: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Code reviews

• Full workflow backed Code review experience

• Send requests to one or more team members

• Great new Diff experience– Inline mode– Side-by-Side mode– Line highlighting including sub-line highlighting– Full Intellisense within Diff Tool

• Accept or decline code review requests from others

Page 6: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Requesting a code review

Page 7: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Accepting and responding

Page 8: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

DEMO

Microsoft Virtual Academy

Code reviews

Page 9: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Click to edit Master subtitle style

Microsoft Virtual Academy

Incorporate unit testing

Page 10: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

What the Study Guide says…

• Incorporate unit testing– establishing unit test standards– developing a strategy for adding unit tests to existing

applications– selecting the unit test type– establishing the code coverage target

Page 11: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Unit Testing Architecture

Visual Studio Unit Test Explorer

Command Line Runner

TeamBuild Unit Test Activity

Visual Studio Unit Test Platform

MS-Test Managed

MS-Test Native NUnit xUnit.net QUnit MORE!

Page 12: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Developer Focused Unit Test Experience

Red-Green Bar Most important

tests shown first

Timings

Shows tests from any

framework

Search

Run Details

Page 13: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Code coverage in VS2012

• Analyze your code coverage with a single click

• Analyze for selected tests to help find how specific tests are covering your system

• Supports native code (via the MS-Test Native framework)

• Works with third party managed & native frameworks

Page 14: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Code Clone Analysis

• New feature in Visual Studio 2012

• Looks for semantically similar code using a heuristic search technique

• More than just simply searching for exact matches

Page 15: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

DEMO

Microsoft Virtual Academy

Unit Testing

Page 16: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Click to edit Master subtitle style

Microsoft Virtual Academy

Develop code

Page 17: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

What the Study Guide says…

• Develop code– developing maintainable code– defining coding standards– defining application architecture– defining configuration management process and tooling

(source control tree, branching strategy, solution structure, source control/check-in policy)

Page 18: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Branching Guidance

• ALM Rangers Guidance Document

• http://vsarbranchingguide.codeplex.com/

Page 19: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

DEMO

Microsoft Virtual Academy

Branching, solution structure and check-in policies

Page 20: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Click to edit Master subtitle style

Microsoft Virtual Academy

Validate quality

Page 21: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

What the Study Guide says…

• Validate quality– organizing test artifacts such as test cases, suites, plans,

and requirements– defining test strategy–managing test execution– identifying test types and associated tools– identifying and configuring environments– Analyzing test runs

Page 22: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Test Plans

• Test plans allow you to group your test suites, test cases and configurations into a convenient group

Test ConfigurationsVista and IE8XP and IE7

Win2K8 and IE8XP and IE8

Test Suites

TESTCASES

TESTCASES

TESTCASES

TEST SUITE A TEST SUITE B TEST SUITE C

Test Plan

Page 23: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Test Suites

• Test suites are groups of related test cases

• There are three types of Test Suites– Requirements based test suite– Static Test Suite– Query-based Test Suite

Page 24: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Understanding each test type in Visual Studio• In this section we’ll look at each of the following type

types– Unit tests–Manual tests– Coded UI tests– Ordered tests– Generic tests–Web performance tests– Load tests

Page 25: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Unit tests

• Written by programmers for use by programmers

• Can be run manually or automatically, usually as part of a build process. (Eg. Continuous Integration)

• Become a form of code documentation by detailing the behaviour of application logic

Page 26: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Manual tests

• Are lists of steps to be manually performed by a tester

• Manual tests are created as Test Case work items in Team Foundation Server

• Contain expected results that a manual tester must choose to pass or fail

• Manual tests are primarily worked on using Microsoft Test Manager (MTM)

Page 27: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Coded UI tests

• Automated tests of the user interface (UI) are known as coded UI tests.

• Provide functional testing of the UI and validation of UI controls.

• You can create coded UI tests to determine that the UI is functioning correctly after code changes.

• Can be created by recording your actions or from an action recording on a manual test

Page 28: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Ordered tests

• An ordered test contains other tests that are meant to be run in a specified order.

• Each test is self-contained and independent.

• Environment state is not retained between each test that is run.

• Do not use an ordered test in which any of the tests have dependencies on the outcome of previous tests in the ordered test.

Page 29: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Generic tests

• Generic tests call external programs and tests.

• Use a generic test to wrap an existing test, program, or third-party tool that behaves as follows:– It can be run from a command line.– It returns a value of Pass or Fail.

Page 30: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Load testing

• Used to ensure your web application performs as expected under a range of user loads.

• Can be used for smoke, load and stress testing.

• Visual Studio monitors the system under test and can provide an enormous amount of data.

• Understanding Performance Monitor counters is required to really interpret the test results .

Page 31: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Web Performance Testing

• Repeatable tests that drive a web application using the HTTP layer.

• Recorded using a web browser but executed using network classes.

• You can analyse the HTTP response.

• Primarily used as the building blocks for Load Tests.

• Should not be confused with Coded UI Tests.

Page 32: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Microsoft Test Manager

• The Microsoft Test Manager (MTM) comprises two Activity Centers;– Testing Center• Work with manual test cases

– Lab Center• Allows you to work with physical or virtual lab environments

• Switch between the two parts using the Activity Center drop down

Page 33: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

DEMO

Microsoft Virtual Academy

Organizing test artefacts in Microsoft Test Manager

Page 34: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Click to edit Master subtitle style

Microsoft Virtual Academy

Customize a team project

Page 35: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

What the Study Guide says…

• Customize a team project– customizing a Work Item– customizing Work Item Queries– customizing Team Portal– identifying areas and iterations –managing roles and associated permissions

Page 36: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

What is a Process Template?

• The template TFS uses when creating new Team Projects

• Defines key aspects of a team project such as work item types, queries and reports

• You can choose a process template during the project creation wizard

• While some aspects of the process can be changed after a project has been created, you can’t simply change from one process template to another after the project has been created

Page 37: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Template Architecture

• Process Template Composition

• New Team Project Wizard– used by project leads to create a new team project

• XML Process definition files– a set of tasks that must run to correctly configure a new

team project for the process.

BuildClassificationsGroup and PermissionsLabReports

Test ManagementVersion ControlWindows SharePoint ServicesWorkItem Tracking

Page 38: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Available templates

• There are three out-of-the-box templates (at RTM)–Microsoft Visual Studio Scrum 2.0–MSF for Agile Software Development 6.0–MSF for CMMI Process Improvement 6.0

• While the Scrum and Agile templates are similar, the CMMI template is based on a different MSF process with a different philosophical approach to software development.

Page 39: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Tips before you begin

• Process Template customisation should be planned and well considered before starting

• Always test templates on non-production TFS server instances BEFORE uploading to a production server

• Avoid changes for the sake of change

• Manage template files in the same way you would work with .NET source code.– Store in TFS Source repository– Adopt branching/labelling practises to track versions

Page 40: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

The customisation process

• Download the default process template that you are either currently using or that most closely matches what you want

• Rename the template (Important)

• Make a few small changes at a time

• Verify your changes as you go

• Upload to a non-production server to test

• Create a new team project using your template

• Verify the changes you have made are correct

Page 41: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

Downloading a template

Page 42: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

ProcessTemplate.xml

Step 1: Change the template name

Step 2: Change the template descriptionStep 3: Change the GUID and version numbers

Page 43: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

DEMO

Microsoft Virtual Academy

Getting started with editing process templates

Page 44: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

• While you do not generally need to know the specifics of how to use every quality tool, make sure you know;– what they are– what value they offer – what problems/issues they can solve

• You don’t need to know everything about template customization but have a good general knowledge

EXAM BEST BETS

Page 45: 06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence

©2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics 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.