Using a Lab Environment for Your Application Lifecycle
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
If your application runs on multiple computers, for example, a web client, a web server, and a database server, then you can use Microsoft Test Manager to help you test the application on a collection of computers. If you also use System Center Virtual Machine Manager (SCVMM), then you can take snapshots of the complete collection of computers, and easily restore them to an initial state for each new test run. Visual Studio Lab Management is an extension of Microsoft Test Manager that helps you to manage collections of virtual machines or physical computers for testing, building, and developing applications in Visual Studio.
-
Build, deploy, and test applications automatically.
You can define workflows in Lab Management. A typical workflow could invoke a build in Visual Studio Team Foundation Server, load the built applications into the appropriate computers in a lab environment, and then perform automated tests that are defined by using Microsoft Test Manager.
Team members do not require administrator permissions to perform these deployments. Instead, you can use Lab Management permissions to create role-based self-service groups.
-
Collect diagnostic data from all machines in the environment, even in manual testing.
Without using environments, you can collect diagnostic data only from the machine on which you are working. For example, if you are working on a web browser, it is difficult to collect data from the server. But with a lab environment, you can collect IntelliTrace, test impact, and other forms of data from the web server.
If you use Lab Management in conjunction with System Center Virtual Machine Management (SCVMM), you can also get these benefits:
-
Quickly reproduce specified configurations of machines.
You can store environments of virtual machines that are configured to recreate typical customers' production environments. You can perform each test run on a new copy of a selected stored environment.
-
Reproduce the exact conditions of a bug or other development issue.
Lab Management snapshots capture the state of all computers in the environment at a point in time. A snapshot of environment can be shared with members of a project team. A reference to the stored snapshot can be included in Visual Studio Team Foundation Server work item so that a copy of the environment can be created with a few clicks of the mouse. When Microsoft IntelliTrace data is included in the work item, the execution path of the application to the bug can be fully reproduced on the exact configuration where the bug occurred.
-
Run multiple copies of a test or development at the same time
Using Lab Management stored SCVMM environments, you can deploy multiple copies of an environment at the same time without the computer name conflicts that can limit the use of unmanaged virtual machines in a domain.
Lab Management depends on technologies and concepts that are summarized in the following tables:
Virtual machines
|
Key Concept |
Description |
|---|---|
|
Virtual machine |
A virtual machine is a software implementation of a computer that runs programs as if it is a physical computer. This enables you to run multiple virtual machines on one physical computer. Each virtual machine must have its own installation of an operating system and any other software that you require. |
|
Host |
The physical computer that runs the virtual machine. |
|
Snapshot |
A snapshot saves the state of your virtual machine at a specific point in time. You can revert your virtual machine to this snapshot whenever you want and then use this virtual machine from this known state when the snapshot was taken. |
|
Virtualization framework |
The tools and services that you use to create and run virtual machines. Microsoft Hyper-V and other virtualization frameworks can be used with Lab Management. |
|
A role in Windows Server that provides a virtualization framework. |
System Center Virtual Machine Manager (SCVMM)
|
Key Concept |
Description |
|---|---|
|
Provides:
|
|
|
Virtual Machine Template |
An image of a virtual machine that has been stripped of identifying information such as the machine name and the product key. You can create multiple virtual machines from a template without creating computer name conflicts on a domain. |
|
Host group |
A group of physical computers that are hosts that can be used to run virtual machines. Host groups optimize the deployment of virtual machines on the collection of hosts for you, so that you do not have to select to which host each virtual machine is deployed. You can assign host groups to your team projects and team project collections in Team Foundation Server. |
|
Library server |
A computer that is used to store virtual machines, templates, and other resources. |
|
Library share |
A shared location on a library server where you can store your virtual machines, templates, and other resources. You can have multiple library shares. You can assign library shares to your team projects and team project collections in Team Foundation Server. |
Lab Management
|
Key Concept |
Description |
|---|---|
|
Lab environment |
A collection of computers on which you can run tests, that Lab Management manages as a logical unit. Each computer that you add to the environment is used for a role in your application. For example, you might select a role of Web server for a computer. Lab Management installs a test agent on each computer, which allows it to control deployment and test execution. |
|
SCVMM environment |
A lab environment that consists of virtual machines that are managed by System Center Virtual Machine Manager. The virtual machines can only run on Hyper-V. By using Lab Management, you can take a snapshot of the states of all the machines in the environment, and restore the environment to a known state on which to run tests. You can also create copies of an environment, which can run independently of each other. |
|
Standard environment |
A lab environment in which the computers can include any mixture of physical and virtual computers. The virtual machines can run on any virtualization platform. You cannot use Lab Management to take snapshots or restore the state of a standard environment. Each computer must run Windows 7, Windows Server 2008, or Windows 8 Consumer Preview. When you define a Standard environment in Lab Management, it installs a test agent on each of the computers. |
|
Lab Center |
The activity area in Microsoft Test Manager where you manage and operate the virtual machines and environments that are deployed on the SCVMM host groups of your team project. |
Choosing between SCVMM and Standard Environments
You can use either physical or virtual machines in creating and managing environments, testing, or build deployment.
|
Creating and managing environments |
On an SCVMM environment, you can: compose virtual machines into an environment; create environments and virtual machines from templates; run multiple copies of environments at the same time using network isolation; and Start/Stop/Snapshot/Restore the machines in an environment. In a standard environment, you can compose any combination of existing physical or virtual machines. You cannot copy or take a snapshot of a standard environment. |
|
Testing |
Using Microsoft Test Manager, you can run tests on both SCVMM as well as standard environments. You can run automated and manual tests, and do rich diagnostic data collection on both types of environment. |
|
Build deployment |
You can easily automate the build-deployment-testing workflow on both SCVMM and Standard environments using the template build definitions provided. (LabDefaultTemplate.11.xaml) |
Lab Management works with both SCVMM environments and standard environments, but the capabilities of each type of environment are different. The following table summarizes the different capabilities for each type of environment.
|
Capability |
SCVMM Environments |
Standard Environments |
|---|---|---|
|
Testing |
|
|
|
Run manual tests |
Supported |
Supported |
|
Run coded UI and other automated tests |
Supported |
Supported |
|
File rich bugs using diagnostic adapters |
Supported |
Supported |
|
Build deployment |
|
|
|
Automatic build-deploy-test workflow |
Supported |
Supported |
|
Environments creation and management |
|
|
|
Automatically install test agent into machines of the environment |
Supported |
Supported |
|
Create environment from VM template |
Supported |
Not supported |
|
Start/stop/snapshot environment |
Supported |
Not supported |
|
Connect using Environment Viewer |
Supported |
Supported |
|
Run multiple copies of an environment at the same time using network isolation |
Supported |
Not supported |
|
Task |
Related content |
|---|---|
|
Try it out: Discover the resources to initially configure Team Foundation Server, SCVMM, and Lab Management, and then create and run virtual machines in an environment. |
|
|
Create lab environments: Lab Management provides a number of ways to create and use lab environments. Learn how to create the lab environments that best fit your needs. |
|
|
Integrate Lab Management in your testing lifecycle: Learn how to use lab environments to make testing more efficient, and the reproduction of bugs easier to create and share. |
|
|
Capture the complete state of a SCVMM environment: Lab Management snapshots Let you store the exact state of an SCVMM environment at a point in time. Testers and developers can then roll back the environment to that state. You can use snapshots to create a clean environment for testing or to reproduce a bug or development issue. |
Using Snapshots to Store, Reproduce, and Share the State of SCVMM Environments |
|
Build, deploy, and test your application automatically: Combine Lab Management lab environments with Team Build workflows and Test Manager test plans to automate the deployment and testing of regularly scheduled build of an application under development. |
|
|
Customize the default workflow template: Add more activities to the lab default workflow template to meet the additional requirements in your build-deploy-test scenario. |
|
|
Find more information and assistance on MSDN blogs and forums: Lab Management blogs and forums provide troubleshooting information and answers to specific questions about using lab environments. |
Caution