Launching automated test cases using Microsoft test manager
-
Monday, August 13, 2012 5:32 PM
Hi,
I am new to Microsoft Test case manager, I was trying out this for running my automated test cases in Mstest.
Following is the scenario I am trying to do with Microsoft Test manager:
1- I have written my test case using Mstest.
2- Test case code is not under source control into visual studio, it's all independently written and managed dll for test cases.
3- We usually run our test cases through Mstest.exe.
The problem with above approach is we do not have a separate test repository in which we can see history of test case, and logged results.
So I was trying out Microsoft test case manager. First I was not able to create association of test case with my code, but I tried using tcm.exe and now able to create my test cases in MTM and I have create one test suit using this.
But when I try to run , it always shows this error:
Cannot create automated test run. A build associated with the active test plan is required to submit an automated test run.
But the issue is we do not have our source code in Source Control so I can not provide any build to it? Is there any way I can skip this and launch my test case without giving build?
Thanks
Gyan
If this answers your question, please mark it as "Answered".
- Edited by Gyan Prakash[MSFT] Monday, August 13, 2012 5:38 PM Spelling mistakes
All Replies
-
Tuesday, August 14, 2012 3:26 AMModerator
Hi Gyan,
Thank you for your post.
To use MTM, you need a TFS in your deployment, connect MTM to TFS. Test case in MTM is also a work item type in TFS, if you create a test case in MTM, there is also add a test case work item to TFS too. About MTM function, you can refer to Quick Start Guide for Manual Testing using Microsoft Test Manager.
Use MTM run automated test, you can refer to Running Automated Tests, you need to all following steps.
1. Each automated test method can just associate with one test case. You need open vs to associate test case and test method, not in MTM. For detail information, you can refer toHow to: Associate an Automated Test with a Test Case.
2. MTM use test plan to run automated test. Test plan contains test case which associate with test method. Test setting and environment is create for test plan. Correct build is select for test plan. For detail information, you can refer to How to: Run Automated Tests from a Test Plan Using Microsoft Test Manager.
3. You should set up lab to hold test environment and test settings. This test environment is need to run automated test in MTM. For detail information, you can refer toUsing a Virtual Lab for Your Application Lifecycle.
4. You need use TFS build to build the test application, then choose the correct build for test plan. For detail information, you can refer toCreate a Basic Build Definition.
Regards,
Lily Wu [MSFT]
MSDN Community Support | Feedback to us
- Edited by Lily_WuMicrosoft Contingent Staff, Moderator Tuesday, August 14, 2012 3:28 AM
- Marked As Answer by Lily_WuMicrosoft Contingent Staff, Moderator Monday, August 20, 2012 10:25 AM
-
Tuesday, August 14, 2012 8:35 AM
If you are not using Team Build, you need to create a 'Fake Build' in TFS. The Fake Build contains the drop location of where you will place your test DLL's containing the associated automation methods. You then associate that build with MTM in the Test Plan. It is your responsibility to ensure that the build drop location contains the files you want to test before you run the tests from MTM.
To create a Fake Build, please see:
http://blogs.msdn.com/b/densto/archive/2010/03/02/creating-fake-builds-in-tfs-2010.aspx (it's an old post, but still relevant)
Alternatively, try the Command Line version here:
This contains a good overview (but in more depth):
http://blogs.msdn.com/b/densto/archive/2010/03/05/automated-testing-in-vsts-tfs-2010.aspx
Grey Ham
Blog: http://www.havecomputerwillcode.com/blog
- Edited by Grey Ham Tuesday, August 14, 2012 8:45 AM

