Test case management commands (tcm.exe)
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
You can perform several tasks to list, view, copy/clone or run tests using the tcm.exe command-line tool. Most commands are supported for both on-premises and hosted Azure DevOps.
Work with the TCM command-line tool
To exercise the TCM command-line tool, you must have the following in place:
Installed Visual Studio 2017 Professional or earlier version. You access tcm.exe from the command prompt and the following directories:
%programfiles(x86)%\Microsoft Visual Studio\2017\Professional\Common7\IDE
%programfiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE
%programfiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE
To run a tcm.exe command, specify the
/collection
and/teamproject
parameters, and/login
as needed.Parameter Description /collection :CollectionURL
Required. Specifies the URI of the team project collection. The format for the URI is as follows:
- For Azure DevOps Services:http://dev.azure.com/OrganizationName
- For Azure DevOps Server:http://ServerName:Port/VirtualDirectoryName/CollectionName
. If no virtual directory is used, then the format for the URI is as follows:http://ServerName:Port/CollectionName
/teamproject: project
Required. The name of the project that contains the test objects you want to clone or import automated tests into. /login: username,[password]
Optional. Specifies the name and password of a valid Azure DevOps user and who has permissions to run the command. Use this option if you're using basic authentication, you're not connected to a domain, or your Windows credentials don't have the appropriate permissions. You must be a valid member of the project you want to access and have the required permissions based on the commands you run. For more information, see Manual test access and permissions.
TCM commands
The following table provides links to articles that describe how to exercise the corresponding tcm.exe command. Most commands are supported on both Azure DevOps Server, all versions, and Azure DevOps Services.
Command
Azure DevOps Services
Azure DevOps Server
tcm configs:Lists test configurations
✔️
✔️
tcm fieldmapping
: Imports or exports an XML file for defining the resolution types, bug type, and failure types.
Note
You can only exercise this command on collections that use the Online XML process model. For Azure DevOps Server 2020 and later versions that use the Inherited process model, import of XML files aren't supported.
✔️
tcm plans
: List or clone test plans.
✔️
✔️
tcm run
: Creates, deletes, lists, aborts, publishes, exports, or runs a group of tests. Also supports importing automated tests into a test plan.
✔️
✔️
tcm suites
: List or clone test suites.
✔️
✔️
tcm testenvironments
: View and list test environments.
✔️
✔️
tcm testcase
: Import test cases from a specified assembly or a test file
✔️
✔️