Automating a test case in Microsoft Test Manager

To successfully automate a test case in Microsoft Test Manager (MTM), numerous steps must be taken. These include creating TFS test cases, creating UI tests, linking test cases to test methods, creating a lab environment and settings to run your tests, and more. Additionally, in this section, a simple coded UI test project is created to let you verify that the entire AUT, including its user interface, is functioning correctly.

If you use TFS 2018, be aware of its substantial changes:

  • XAML Build has been deprecated. Furthermore, Microsoft Test Manager (MTM) no longer supports XAML builds
  • Using Test Center/Lab Center in MTM for automated testing is no longer supported by TFS, starting with TFS 2018.

Accordingly Build vNext and the Test Hub in the TFS web portal are ideal replacements for respective XAML Build and MTM.(See also: Team Foundation Server 2018 Release Notes)

Creating TFS test suites and test cases
Create test suites MTM and assign test cases to them.

Creating a test method
To automate a TFS test case, you must link it to a test method in Visual Studio. You can link any unit test, coded UI test, or generic test to an TFS test case.

Associating a TFS test case with a test method
Association creates a linkage between a TFS test case and a test method in Visual Studio. You can link any unit test, coded UI test, or generic test to an TFS test case.

Creating and configuring a build definition
This topic describes how to create and configure XAML and TFBuild definitions.

Queuing a new build
After creating a build definition, the new build must be queued.

Creating a new environment in the Microsoft Test Manager Lab Center
To run your automated tests using Microsoft Test Manager (MTM), you must use a lab environment. It must have roles for each of the client and server machines used in your tests.

Configuring run settings
To specify which build definition, environment, etc., is to be used for running tests on Microsoft Test Manager (MTM), run settings must be configured.

Running automated tests in Microsoft Test Manager
This topic describes the details of running automated tests in a lab environment using Microsoft Test Manager.

Copyright © 2021 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1(800) 322-0333