MTM : Is there a way to find test run completion status using command line utility tcm.exe
microsoft-test-manager, tcm
Solution
I don't think this is possible. The available switches for `run` option are:
- delete
- abort
- export
- list
- create
- publish
The only data you can take about `runs` using `/list` is
- Id
- Title
- Owner
- Date Completed
you can see this by running:
tcm run /list /planid:<plainId> /collection:<CollectionUrl> /teamproject:<TeamProject>
Moreover, you don't have the `runId` yet so even if there was an option to get the completion status, in your case that would not be easy.
So, I think you should start looking for another solution. Perhaps the TFS Api is what you need. Check these links:
- Automation test run creation using tfs api
- TFS 2010 API - Get Results of a Test Run
Problem
I use MTM (Microsoft test manager) for running my automated test cases. I schedule test runs using `tcm /create` command (trigerred from a powershell script) and once the test run is completed I need to copy the `trx` (result) file on my local machine. So I want to wait till the test run is completed in some sort of polling mechanism. Hence, I need a command to fetch the current test run status using test runid. Is there a way to get MTM test run status in this way?