Advertisment

Visual Studio Team Lab Management

author-image
PCQ Bureau
New Update

Software development teams are under pressure to do more with less. The

demand to complete projects on time and with higher quality has only increased.

To simplify common tasks, developers are using more and more sophisticated

development tools and frameworks. Testers are increasingly relying on testing

tools to efficiently manage and run test cases. Version control and build

management tools have become common place in every project. And teams are

adopting project management tools and new agile methodologies to drive higher

efficiencies.

Advertisment

Nevertheless, software development teams still spend enormous times in

setting up and maintaining environments for development, testing, integration,

and staging. They spend significant resources in deploying every build on these

environments before an application goes to production. Ad-hoc processes are

followed to rollback an environment and to re-try the process each time a

deployment fails. Finding hard-to-find bugs and identifying steps to reproduce

an issue are still more of an art than science. And because of project

deadlines, developers often do not have the time to re-create environments to

adequately verify their fixes. These problems are causing software teams to

remain inefficient.

Direct Hit!

Applies To: Data center admins



USP: Take the pain out of software
debugging



Primary Link: http://msdn.microsoft.
com/en-us/vstudio/ee712698.aspx



Keywords: Visual Studio Team Lab
Management


Visual Studio 2010, the upcoming release of Visual Studio from Microsoft,

promises to take software development to the next level by addressing these

inefficiencies. In addition to offering significant new capabilities for

software testing, project tracking, build management, and version control,

Visual Studio 2010 offers virtual lab management. Virtual lab management uses

virtualization technology to make creation of environments, deployment of builds

on those environments, and running tests a whole lot easier. In this article we

take a deeper look at these key features of Visual Studio Team Lab Management

and how they can remove inefficiencies and increase productivity of software

development teams. The next section describes the basics of virtualization and

how it benefits software development. Subsequent sections examine the prominent

features of Visual Studio Team Lab Management in greater detail.

Advertisment

Virtual lab management



Virtualization is a means of running multiple computers on a single physical

computer. Each computer running on the physical computer has a complete

operating system and application stack and is known as a virtual machine.

Virtual machines have two key capabilities that make them ideal for use in

software development. Being emulated in software, an entire virtual machine can

be copied by just copying a set of files. As a result, an environment that is

made of virtual machines can be copied as many times as required without the

need for installing software over and over again. The second capability of

virtual machines that is handy for development teams is snapshots. A snapshot is

a 'marker' of an entire state of a virtual machine at a given time. Once

created, a user can revert to that snapshot at any time, and resume the

execution of the machine from exactly the same state as it was in when the

snapshot was taken. This makes it very convenient to preserve the clean state of

an environment. One can revert to this clean state before deploying a build or

after running tests.

Here we create a new environment, which

comprises of two virtual machines.

Visual Studio Team Lab Management makes virtualization easily accessible to

developers and testers. It enables teams to accelerate setup and restoration of

complex environments to a known clean state for test execution and build

automation. It also allows testers to file rich bugs with links to environment

snapshots that developers can then use to recreate complex environments,

effectively reducing wasted time and resources in development and test

lifecycle. Moreover, these capabilities are integrated into development and

testing tools that teams are already familiar with.

Advertisment
In this screen, you can define workflow for

different processes in Team Lab Management.

Creating environments



In the process of developing applications, software teams create and manage

multiple environments. Using Visual Studio Team Lab Management, team members can

create environments on the fly from a set of golden master images stored in a

library. An environment in Team Lab Management is simply a collection of virtual

machines, each fulfilling a role for the application. For instance, an

environment can consist of a virtual machine serving as a database and another

virtual machine serving as a web server. The master images are pre-created

virtual machines with the right operating system and application pre-requisites.

The creation of these master images is a one-time activity and can even be

performed by converting physical machines that are used in production into

virtual machines.

Follow these steps in order to create a virtual environment:

Advertisment
  • Create one or more golden master virtual machines in the library using

    Virtual Machine Manager. Install the team agents — lab agent, test agent, and

    build agent - on these virtual machines.
  • Using Test and Lab Manager, import the golden masters into your team

    project.
  • Create a virtual environment from the golden masters. Select the testing,

    workflow, and network isolation capabilities while creating the environment.

This paradigm of creating an environment on-demand from a set of master

images and making that accessible to developers and testers changes the way

software teams provision environments. Without adding the work of installing

software or configuring the application, software teams can create environments

with the click of a button. Additionally, they can be assured that their

environments mimic the production environment.

Here you can file for a bug across logs and also

get a complete snapshot of the environment.
Advertisment

Deploying builds



Every time a new build is created, teams use scripts to deploy it on various
environments. And often, one has to run a set of basic verification tests to

test the sanity of a build. Visual Studio Team Lab Management formalizes the

deployment process through the definition of a build-deploy-test workflow. The

pre-packaged workflow in Team Lab Management performs the build of an

application, followed by reverting of an environment to a clean snapshot,

deployment of the build onto the environment, and then finally running a set of

tests. Teams can either use this pre-packaged workflow and specify the

deployment scripts or customize this workflow to perform more complex tasks.

Follow these steps in order to create a build-deploy-test workflow:

  • Using Visual Studio Team Explorer, create a new build definition from 'lab

    default template'.
  • While creating the definition select the virtual environment, the

    definition for compiling sources, the scripts for deployment, and the test

    suite.
  • Once created, queue the new build definition.
Advertisment

With this, development teams do not have to worry about consistency of the

deployment process in various environments. They also do not have to spend time

in running rollback scripts or performing additional procedures when deployment

fails half way through. They can simply revert to the clean snapshot of the

environment before deploying the next build.

You can create several copies of an environment

and share it with multiple users.

Running tests



Visual Studio Team Lab Management integrates with testing tools in Visual

Studio to simplify running of manual or automated tests on environments. Testing

tools in Visual Studio already have the capability to collect logs of various

forms from the machines in an environment. Testers can attach these logs when

they file bugs. With Team Lab Management, testers can also include a snapshot of

the entire environment to the bug. Developers can then connect to the same

environment or to a copy of the environment in order to reproduce the problem or

to validate their fix.

Advertisment

Follow these steps in order to file a bug using a snapshot:

  • While testing on a virtual environment using Microsoft Test Runner, take a

    snapshot of the environment.
  • When a bug is filed, the snapshot is then attached to the bug in the form

    of an attachment.
  • When a developer sees the bug in Team Explorer, he can open the attachment

    to connect to the same environment.

With this feature, testers do not have to spend time finding a consistent

reproduction for an accidental bug that they discovered. Coupled with the rich

data collection features of Visual Studio, the snapshots in lab management

provide all the information necessary for a developer to act upon an issue. The

turnaround time of a bug that is otherwise spent trying to reproduce the problem

or to recreate the environment is cut down.

Copying environments



Since environments are made of virtual machines, they can be easily copied.

Each developer and tester can have a copy of the environment containing the

required build. However, bringing up copies of environments at the same time

causes computer name and other networking conflicts. Lab management solves this

problem through a technology called network isolation, which automatically

configures the network of virtual machines and their IP stack to avoid

conflicts.

Follow these steps in order to copy environments:

  • When creating the environment, ensure that network isolation capability is

    selected.
  • After working with it, shut down the environment and store a copy in

    library.
  • Deploy another copy of the environment from the library. At this point,

    you have two deployed environments.

Summary



Virtualization simplifies software development. A number of teams and
organizations realizing this are already adopting virtualization — some through

the use of desktop virtualization tools such as Virtual PC, and others through

the development of home-grown tools for managing virtual labs. Visual Studio

Team Lab Management addresses this exact need through an out-of-the-box

solution. Compared to other competitive tools in this space, Visual Studio Team

Lab Management has two advantages: it integrates the otherwise complex task of

managing virtual machines into tools and processes that developers and testers

are already familiar with; and it does not require expensive hardware thereby

removing the adoption barrier for projects and department level teams. To learn

more about how Visual Studio Team Lab Management can increase the productivity

of your team or to try the product, visit the primary link given in the box.

Vijay Machiraju, Sr. Program Manager, Visual Studio Team Lab Management

Advertisment