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

31
28. Januar, Zürich- Oerlikon

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

Page 1: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

28. Januar, Zürich-Oerlikon

Page 2: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

Working withVirtual Test EnvironmentsMarc MüllerPrincipal Consultant4tecture GmbH

Page 3: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

Agenda

Agenda

IntroductionBuild, Deploy, TestInfrastructureLab Management for DevelopersSummary

Page 4: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

IntroductionKapitel 1/5

Page 5: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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.

Page 6: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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.

Page 7: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

Rich BugsScreenshot

System Info

Video Capture

Test Environment

Log

Debug Log

Test Case (for repro steps)

Action Recording

Page 8: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Page 9: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Page 10: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

Build, Deploy, TestKapitel 2/5

Page 11: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

Traditional Build workflow

build applica

tion

deploy

application

run tests

Page 12: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

Lab Management Build Workflow

build app.

restore env.

deploy app.

take env.

snapshot

run tests

restore snapsh

ot

Page 13: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

InfrastructureKapitel 3/5

Page 14: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Page 15: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Page 16: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Page 17: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Page 18: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Page 19: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

DEMOLAB MANAEMENT WORKFLOW

Page 20: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

Recap – Lab Management Workflow

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

Predictable deployment

Post-deployment snapshot facilitates exploratory testing

Page 21: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Page 22: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Page 23: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

DEMO – STANDARD ENVIRONMENT

Page 24: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

Lab Management for DevsKapitel 4/5

Page 25: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

DEMO - LAB FOR DEVS

Page 26: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Page 27: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

SummaryKapitel 5/5

Page 28: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Page 29: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Page 30: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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

Marc Mü[email protected]@muellermarc

http://www.4tecture.ch

Page 31: 28. Januar, Zürich-Oerlikon. Working with Virtual Test Environments Marc Müller Principal Consultant 4tecture GmbH.

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