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?
I don't think this is possible. The available switches for run
option are:
The only data you can take about runs
using /list
is
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: