2

I want to make sure that I can run my unit test developed using specflow-c# from MTM on my local machine.

Background info: - Developed the unit test methods using SpecFlow-C# - Checked in my project to TFS

Problem: - Now can anyone guide me step by step, how to achieve the integration of this unit methods. I have gone through various articles of the MSDN, but somehow i get lost in there. I have learnt that i need to create a build defination (But how to?), setup test controller and test agent (Again how?).

Please guide me in this.

Thanks in advance.

Ankit
  • 169
  • 1
  • 4
  • 16

1 Answers1

1

MTM needs three things to execute tests:

  1. A build with which to associate the test run. It can only read from TFS. If you're not using TFS for build/deployment you can run the TFSBuild.exe tool to create a dummy build in TFS to point MTM to.

  2. A test lab in which to run the test. Install both the controller and agent on your local machine. Open the agent configuration tool and register it to the controller. Open the controller configuration tool and register it with TFS Team Project Collection. Once this is done, you should be able to see the controller when setting up the lab environment in MTM.

  3. A test case in TFS which is associated with a unit test. As far as I know, this association must be made in Visual Studio. In Team Explorer, open up the work items. Find your test case and click on the Associated Automation tab. In the Test Name field you select a unit test method to tie to the testcase. This is the test that gets run when the testcase is executed in MTM.

John O.
  • 708
  • 5
  • 9
  • Thanks John for the info. The problem i am facing is when i run my automated test cases from MTM, test case is getting passed or failed but i cannot see live actions of browser. Note that i opened my test agent machine (which is remote machine) while i run the tests, but i cannot see any browser actions over there. Am i approaching this wrong? It would be great if you can provide me any heads-up. Thanks – Ankit Nov 20 '14 at 06:58