Agafonov Slava Digest about software

Microsoft Test and Lab Manager and Visual Studio 2010

Dedicated testing tool that allows manuals tests plan, test cases, file bugs, create bugs in TFS for quality assurance team. This article demonstrates how to use the Microsoft Test and Lab Manager in Visual Studio 2010 to manage test suites and test cases. This article is based on the Application Lifecycle Management Hands-on Labs. That article will include end-to-end software testing capabilities of Visual Studio 2010. This includes a deep look at manual testing, lab management, data diagnostics adapters, the "actionable bug", functional UI testing, test impact analysis, test automation, and much more which will help you more easily find and eliminate defects from your software.

After wasting years not leveraging its huge developer's community to spread virtualization in every corner of the world, the company is finally moving on. Announced in November 2008, the integration between Visual Studio 2010, System Center Virtual Machine Manager (SCVMM) 2008 and Hyper-V 1.0/2.0 for virtual lab automation scenarios is now a reality called Visual Studio 2010 Lab Management.

Get Microsoft Silverlight

Lab Management in Visual Studio 2010 provides an integrated development and testing platform for end-to-end virtual lab management. Lab Management enables development and quality assurance teams to work together more effectively to optimize the build process and minimize regression-testing efforts. It helps reduce costs associated with setup, teardown, and restoration of complex virtual environments to a known state for build automation, build deployment, and test execution.

Microsoft Test and Lab Manager and Visual Studio 2010

Visual Studio Lab Management lets you manage a collection of virtual machines, templates, and virtual environments for your Team Foundation team project. You can use these environments to develop, test, or run your application. A virtual environment is a collection of virtual machines (VMs). Each VM in a virtual environment represents a role required for the application that you intend to develop, test, or run. For example, you might be developing a multi-tiered application that requires three roles: a desktop client, a Web server, and a database server. 

Microsoft Test and Lab Manager and Visual Studio 2010

When you create virtual machines from the golden master to represent a specific role that is required for a tier in your application, you then use these virtual machines to create an environment that is based on the roles in your application, as shown in the following illustration.

Get Microsoft Silverlight

The Visual Studio Team System (VSTS) Lab Management Team has recently started a blog that introduces to the virtual lab automation and the capabilities of Visual Studio 2010 that is well worth a subscription.
Here’s a small excerpt from their first article:

The lab management service in TFS uses System Center Virtual Machine Manager (SCVMM) for management of lab infrastructure and provisioning of virtual machines across multiple virtualization platforms. You get a copy of SCVMM with Lab Management.

Microsoft Test and Lab Manager is a Windows Presentation Foundation based rich client. The Lab Center in Test and Lab Manager allows you to

  • Create and manage virtual or physical environments
  • Take environment snapshots or revert to existing snapshots for virtual environments
  • Interact with the virtual machines in the environments through environment viewer
  • Define test settings for the environments

You can define test plans, test suites and test cases in the Testing Center and execute them on the lab environments.

Microsoft Test and Lab Manager and Visual Studio 2010

You can use Lab Management to start all the virtual machines in the environment to run an application, or test an application. Lab Management uses System Center Virtual Machine Manager (SCVMM) to allow you access to virtual machines or templates in a library as your golden masters. These golden masters are created by using either Hyper-V or SCVMM. SCVMM is used to deploy the virtual machines and templates in your environments on the specified host group. For more information about Lab Management, see Using a Virtual Lab for Your Application Lifecycle. Lab Management integrates with Team Foundation Build to let you deploy your application to a virtual environment, and run tests after the build is deployed. For more information, see Deploying An Application to a Virtual Environment. You can also run tests at any time on your virtual environments by using Microsoft Test Manager. For more information, see Testing Using Virtual Environments.

Microsoft Test and Lab Manager and Visual Studio 2010

To begin with, MTLM allows you to create Test Plans for a Team Project. These plans have configuration settings, start and end dates, tests (which are arranged into "test suites") and test results. You can have as many different test plans as you want for a given project with the same or different test plan owners.

Lab Management

Testing Management with Visual Studio 2010

The Run Tests page allows you to execute manual or automated tests and it also shows you the results of the last test run for the selected test suite.

Microsoft Test and Lab Manager and Visual Studio 2010

When executing tests you are presented with the Test Runner. The Test Runner allows you to execute multiple tests at once and shows each test step in detail. In this figure I am in the process of filing a bug against the selected step to which I have attached a screenshot and provided a comment about the failure. Each step can be marked as passed or failed and when you file a bug against a test, all of the information about the test is captured.

Microsoft Test and Lab Manager and Visual Studio 2010

References

Working with Lab Management

Lab management

Summary

Microsoft Test & Lab Manager (MTLM). MTLM is included as part of Visual Studio Ultimate, but as a standalone product it is also included (and is the main part of) Test Elements. It is a professional functional testing tool that gives you the ability to write, run and execute manual tests and to track the results. It has no dependencies on Visual Studio but does require TFS. The Test Runner allows for easily executing tests and filing bugs with all of the information a developer needs to fix the bug -- and the tester does not have to do anything in particular to get this all to work. There are many more capabilities available to you with MTLM and hopefully this brief insight will get you excited about the possibilities and all of the other great features available to you with the testing tools in Visual Studio 2010.

Microsoft Test and Lab Manager and Visual Studio 2010

Comments (10) -

  • Flinyn

    12/21/2010 6:31:04 AM | Reply

    Very nice post and straight to the point.

  • Angela Perez

    12/21/2010 2:54:07 PM | Reply

    Perfect! very good writer.I had to say that this blogs is really amazing. Very interesting article. I learned a lot thanks!

  • free online dating

    5/7/2011 9:21:20 PM | Reply

    Its been nice to go through your post.
    It has given me much knowledge & so many valuable information.

  • Sandeep Tripathi

    11/3/2011 12:39:57 PM | Reply

    Hi Agafonov,

    I hope you are doing good, please help me.
    I want to Configure Microsoft Lab Management without TFS server please help me regarding this.

    Thanks
    Sandy

  • operaza

    4/6/2012 9:08:18 PM | Reply

    The microsoft guy couldn't get this stuff working with the build definition. I assume it is not that simple.
    Do you guys know if there is also the possibility to automatically  update the build definition settings or the lab template through a build script or batch file?
    Let's say I want to select the target virtual machines based on a batch file or other build script logic, is that possible? Is it possible to interact with all these Lab Management features directly from a build script and customize or automate these?

  • Slava Agafonov

    4/6/2012 10:21:42 PM | Reply

    Sandeep,

    You can run your tests with Windows Task Scheduler. The Task Scheduler is capable of handling many scenarios and is easy to script.

  • Slava Agafonov

    4/6/2012 10:24:22 PM | Reply

    Operaza,

    With the "Built in" stuff, you can't, as using 1.0.* or 1.0.0.* will replace the revision and build numbers with a coded date/timestamp, which is usually also a good way. For more info, see the Assembly Linker Documentation in the /v tag. As for automatically incrementing numbers, use the AssemblyInfo Task: code.msdn.microsoft.com/AssemblyInfoTaskvers

    This can be configured to automatically increment the build number. There are 2 Gotchas:
    Each of the 4 numbers in the Version string is limited to 65535. This is a Windows Limitation and unlikely to get fixed.
    blogs.msdn.com/.../...umbers-limited-to-65535.aspx
    Using with with Subversion requires a small change:
    www.andrewconnell.com/.../4078.aspx
    Retreiving the Version number is then quite easy:

    Version v = Assembly.GetExecutingAssembly().GetName().Version;
    string About = string.Format(CultureInfo.InvariantCulture, @"YourApp Version {0}.{1}.{2} (r{3})", v.Major, v.Minor, v.Build, v.Revision);

    • operaza

      4/7/2012 12:28:25 AM | Reply

      I got rid of the versioning stuff by running an "Increment Build Number" task as part of the build script and using a custom template.
      Basically doing some text replacement in the custom template then checking it back in, and updating also the AssemblyInfo.cs files for the VS projects with the build number information. I didn't have the time to go through the workflow templates at that time, which should be the cleaner way to go, but it worked so far that way.
      It's good enough for me right now because people can't trigger new builds, or they can trigger them but they will fail if they use that custom template unless an increment build number task run first. So I can get the whole thing under control for my particular scenario to keep a common build number by having all the build definitions using that custom template.

      What I'm wondering is if I have to do the same in the labtemplate or if there is already an api or some command line tool to interact with this as part of a build script.
      People where I'm at want the builds applied nightly to a VM selected by management, so the environment in this case is going to be a variable that the build script need to pass I guess to the labtemplate. I mean I can go the text substitution way and it should work, just wondering if microsoft has something create to interact with this through scripts or batch which is what normally drives the builds instead of the workflow thing.


  • Elizabeth

    5/22/2012 10:50:51 PM | Reply

    Hi Slava,

    I have some questions to you, I hope you can resolve them.
    I'm from Chile and my company is interested in purchase this software but they need to know somethings before that:

    - This Test and Lab Manager can be used only on web applications?
    - The automated testings always needs a tester guy to do all the steps?

    Thanks!

Add comment

Loading

Copyright © 2018 - Design by FS