VSInsider

Visual Studio 2010 Lab Management

A few months after the Visual Studio 2010 family of products was released to manufacturing, Microsoft produced the final version of its new Lab Management product. Originally designed as a separate product with distinct licensing, Microsoft changed its plans: Anyone with either a Visual Studio 2010 Ultimate license or a Visual Studio 2010 Test Professional license (with a qualifying MSDN subscription) can run Lab Management. Naturally the cost savings are great. And of course, if you're a tester, it's a big win. But why would developers care?

First, it's important to understand what Visual Studio 2010 Lab Management can do for a team. Lab Management provides a centralized way to create, manage and share environments in your domain-joined Team Foundation Server (TFS) 2010 development shop. While physical environments have a purpose, the real value is virtual environments.

Virtual Benefits
In this first release, Lab Management virtual environments are made up of one or more Hyper-V virtual machines (VMs). There are steps you can take to integrate VMware VMs, but you're going a bit offroad and not getting great out-of-box support -- maybe next release. Today, you can build your environments to duplicate a variety of configurations: a single workstation implementation running Windows XP, for example, to a complete virtual domain. Lab Management also provides a feature called Network Isolation, which lets you run an environment that's completely separated from your network but accessible to your development team. This means you can closely duplicate the topology of your production environments -- on-premises for internal applications or off-premises for external customers. Once you have environments defined, you can use them for a number of tasks.

As part of the team value, one of the first things I like to do with Lab Management is get a build up and running. Lab Management integrates with the build feature of TFS 2010. With an included template, you can take an existing build and turn it into a build-deploy-test workflow. When you define this new build using a wizard, you define a number of options based on your needs. The first thing you do is tell the wizard what environment you want to use. Next, you tell it what build you want to use. Then you tell it how to deploy that build -- XCOPY, MSI, whatever you can provide a command line to, you can deploy. Finally, you tell it what tests you like to run. The template provided is based on Windows Workflow 4, so you can customize it to your heart's content. The key is once this build is working, you now have a repeatable way to get your application out on a set of machines that can be used for testing and debugging.

Environment Snapshots
Because Hyper-V supports a feature known as snapshotting, during the execution of your new Lab Management build, you can start from a known, good clean state. You can also take a snapshot after deployment but before any tests are run. This means after the build is complete, testers can take a clean copy of the environment -- which can be stored and shared in environment libraries -- and start doing additional manual tests. One of the key values in Lab Management is that it understands how to logically group snapshots for an environment with more than one VM. And this is where it gets good for you, the developer -- you can stop playing metaphorical Ping-Pong with your testers.

Visual Studio 2010 Ultimate includes a feature known as IntelliTrace, which is "TiVo" for developers. You can rewind and fast forward your application's execution stack. You can use IntelliTrace daily in Visual Studio 2010 as you write code, but it's also useful to you when testers use it. The tester finds a bug (yes, I know you write bug-free code, but let's pretend you're having an off day), then he creates an actionable bug, which contains IntelliTrace logs with rich data about what went wrong that you can play back inside Visual Studio 2010 to see where the problem occurred. And here's where it's all money -- the tester can attach a link to a snapshot of the environment to the bug. You can now spin up the environment at the point in time right after the bug occurred to really dig in and find out what's causing the code to not work. That, my fellow developers, is why I love Lab Management. When something goes wrong and it's affected by the runtime environment, I can easily jump to the environment and see what's going on -- whether it's an older version of Windows or possibly a server-based configuration that I wouldn't normally have on my desktop. I find bugs quicker. I spend less time messing with software installations. I get to have a life.

About the Author

Brian A. Randell is a senior consultant with MCW Technologies LLC. For more than 20 years he has been building software solutions and teaching Microsoft technologies to developers and consulting worldwide. In early 2010, he toured the world prepping Microsoft employees and Microsoft partners for the Visual Studio 2010 launch. He's currently a Visual Studio ALM MVP and when not working enjoys spending time with his wife and two young children.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube