I have seen a lot of customers who use TCM.exe to execute tests on remote environments, but I have not seen many who use the same command-line to execute the tests locally. Here by locally, I mean tests running on the developer’s/tester’s box, which does not have any test controller or test agent and has only MTM. Yes, it’s possible to do this in 2012 version. 🙂
Now Let us go over the steps which you should follow to execute the tests locally.
- Use TCM.exe to create a test run without specifying the test environment name. Your command will look something like this: –
tcm run /create /title:"Nightly Run" /planid:1 /suiteid:5 /configid:13 /settingsname:"<Name of your automated test settings>" /collection:<CollectionURL> /teamproject:<Team Project name>
- On successful test run creation, you will get output from an output similar to the one mentioned below. From this output, you will know about the id of the test run which got created.
Run created with ID: <xxx>
- Launch TCM.exe again to execute the newly created test run locally.
tcm run /execute /id:id /collection:<CollectionURL> /teamproject:<Team project name>
On completion, you will get the results as shown below.