28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal...

Post on 21-Jan-2016

214 views 0 download

Tags:

Transcript of 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal...

28. Januar, Zürich-Oerlikon

Working withVirtual Test EnvironmentsMarc MüllerPrincipal Consultant4tecture GmbH

Agenda

Agenda

IntroductionBuild, Deploy, TestInfrastructureLab Management for DevelopersSummary

IntroductionKapitel 1/5

The Problem

Testers find bugs but may be unable to document them in sufficient detail so that they can be acted upon by developers.

Developers may not have access to the only environment in which a bug can be isolated.

“If it can’t happen twice, it didn’t happen once” - James (my mechanic)

You can’t fix what you

can’t reproduce.

So how do we make bug’s reproducible?

Allow testers to create bugs that contain “actionable” information.

Allow developers the ability to “Make it happen the second time”

Give developers access to the test environment at the point the bug was encountered.

Rich BugsScreenshot

System Info

Video Capture

Test Environment

Log

Debug Log

Test Case (for repro steps)

Action Recording

Where do you test?

DevsTester

UAT ReleaseManager

Pre-Prod environment

Web Server

DB Cluster

Build environment

Web Server

DB Server

Dev environment

Web + DB Server

QA environment

Web Server

DB Server

Web Server

Web Server

DB Cluster

Web Server

Virtual Test Environments

Test multiple configurations in parallel• Lower Hardware / Software costs

Easy preparation and clean-up of test environments• Templates• Initial and deployed-state snap-shots

Link environment to bug • Environment to reproduce bug (link to snap-shot)

Multi-Machine Environments• Snap-shots across multiple VM• Network Isolation (fixed IP and Names, Custom AD, etc.)

Single Tool – Microsoft Test Manager (MTM)• Environment Management, Environment Viewer (no need for RDP Client), Test Mgmt,

manual Testing

Build, Deploy, TestKapitel 2/5

Traditional Build workflow

build applica

tion

deploy

application

run tests

Lab Management Build Workflow

build app.

restore env.

deploy app.

take env.

snapshot

run tests

restore snapsh

ot

InfrastructureKapitel 3/5

Lab Management - VirtualizationAvailable since Visual Studio 2010Integrates with Hyper-VAllows us to:Create virtual machines from libraryDeploy virtual machines to host and group into an environmentSnapshot of environment for rich bugsSave environment back into environmentDeploy environment from environment

Lab Management – Non Hyper-V

What about physical or non-Hyper-V Environments

- Standard Environment now supports BDT Workflow

- No snap-shot functionality

- Workflow may be modified

Lab Management IntegrationTeam Foundation

Server (TFS)

Test Case management

Build management

Work Item Tracking

Source Control

System Center Virtual Machine Manager

Hyper-V Hosts

Host1

Host2

Hostn

Library Shares

LS1

LS2

LSn

Lab Management

Hyper-V hostVM1

Architecture – Lab + Build + Test (2012)

System CenterVirtual Machine Manager

Team Foundation Server

Lab Management

Test Case Management

Build Management

Source Control

Work Item Tracking

Library Share

Client: Test

Manager

Client: Visual Studio

Stored Virtual Machine

Test Controlle

r

Build Controller

Test Agent

Build agent for Compilation

Stored Virtual Machine 2Stored Virtual

Machine 2Stored Virtual Environment

Physical Machine

Architecture – Standard EnvironmentTeam Foundation

Server

Lab Management

Test Case Management

Build Management

Source Control

Work Item Tracking

Client: Test

Manager

Client: Visual Studio

Test Controlle

r

Build Controller

Test Agent

Build agent for Compilation

DEMOLAB MANAEMENT WORKFLOW

Recap – Lab Management Workflow

Revert virtual environment to ‘clean’ baseline in minutes than hours

Predictable deployment

Post-deployment snapshot facilitates exploratory testing

Network Fencing

iis db

10.10.1.5 10.10.1.6

copy 1

iis db

10.10.1.5 10.10.1.6

copy 2

What is it? create multiple copies of

environment they can run in parallel without

conflicts no application reconfiguration

How does it work? internal fence network is created

for all vms a vm gets the same mac & ip

address, and computer name in all copies

vms are also connected to the external lab network

Network Fencing

iis db

10.10.1.5 10.10.1.6

172.22.48.15 172.22.48.16

copy 1

iis db

10.10.1.5 10.10.1.6

copy 2

fence network(internal)

lab network(external)

172.22.48.18172.22.48.17

What is it? create multiple copies of

environment they can run in parallel without

conflicts no application reconfiguration

How does it work? internal fence network is created

for all vms a vm gets the same mac & ip

address, and computer name in all copies

vms are also connected to the external lab network

DEMO – STANDARD ENVIRONMENT

Lab Management for DevsKapitel 4/5

DEMO - LAB FOR DEVS

Demo – Virtual Environment RecapDebugging with IntelliTrace locallyAbility to create environments quicklyLab environment is a first-class entityRich bugs with lab environments• No more No Repro• Snap-shot to debug

Developer easily connects to environment

SummaryKapitel 5/5

Summary

• Revert to a ‘known’ state in minutes• Predictable multi-machine application deployment• Know build quality before investing in further

testing

No more waiting for build setup

• Prioritize test cases based on code changes

No more wasteful testing

• Environment snapshots, Intellitrace and other collectors capture exact state of problem

No more no repro

If it happened once and you documented it, it doesn’t have to happen again!

Allow Testers to capture bugs the first time they happen

Document the hell out of a bug so that even a Developer can fix it

Use Rich Bug data (IntelliTrace, Video, Action Logs, Snapshot Environments) to find and fix the root cause

Create tests that prove the bug is gone

Besten Dank für Ihre AufmerksamkeitFür allfällige Fragen stehen wir Ihnen jederzeit gerne zur Verfügung:

Marc Müllermarc.mueller@4tecture.ch@muellermarc

http://www.4tecture.ch

© 2012 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.