0

I have set up my Automation test cases in MTM using TFS.

When i build it, the Dlls are also created in the drop folder,

But when I run the test cases , i get the following error :

The test automation associated with the following test case could not be found: [994]. Run the test case again using a build that contains the binary with the test automation

Unable to reach to the solution, Please help.

Arpan Buch
  • 1,380
  • 5
  • 19
  • 41
  • what does this have to do with SpecFlow or Selenium? – Sam Holder Oct 20 '14 at 08:00
  • @SamHolder : I am using specflow and selenium frameworks for automation, so incase someone using it had encountered such issues in past, the tag might help me reach it to them. – Arpan Buch Oct 20 '14 at 08:53
  • but the question has nothing to do with specflow and selenium, its all about MTM and built dlls. You should remove the uneccessary tags, no one with expertise in SpecFlow or Selenium is going to be able to help you here. – Sam Holder Oct 20 '14 at 08:56

3 Answers3

1

You need to run tcm.exe import to keep your test cases in sync with your test artifacts in the dll's.

You are getting the error as the details stored in the Test Case automation tab does not match a method in the DLL specified.

0

Sounds like you don't associate your test plan with a test build.

Check this SO article: Couldn't run my test using Microsoft Test Manager

You can also find a good explanation here: Set up your test plan to use your team build.

[Edit]
Basically, you should see the build in use in MTM then when run your Tests Cases:

enter image description here



[Additional information]
When getting this kind of error messages it is often very useful to activate logging for Test Controller:

  1. Go to the test controller installation directory (C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE).

  2. Open the controller configuration file (QTController.exe.config) and change the trace level to 4 and enable the trace listener as shown below:

<configuration> 
.....
   <system.diagnostics> 
      <switches> 
         <!-- You must use integral values for "value". 
         Use 0 for off, 1 for error, 2 for warn, 3 for info, and 4 for verbose. --> 
        <add name="EqtTraceLevel" value="4" /> 
      </switches> 
   </system.diagnostics> 
.....
   <appSettings> 
.....
      <add key="CreateTraceListener" value="yes"/> 
   </appSettings> 
</configuration> 
  1. Restart the test controller service. (Visual Studio Test Controller (VSTTController))

After this the log file (Vsttcontroller.log) should get generated in the same installation directory.

Community
  • 1
  • 1
Elena
  • 1,928
  • 1
  • 15
  • 23
  • All the steps you have given are already configured. This error comes after i run the test ..when checked , the folder does have the required Dlls . – Arpan Buch Oct 20 '14 at 08:59
  • I suppose you start tests manually from MTM, right? I've just extended my answer, could you please check if you also can see the right build number? – Elena Oct 20 '14 at 09:35
  • Yes Elena , All this are successfully configured. Only issue comes is when i run the test it is says the associated binaries are not found but when i rechecked in the drop folder, the dlls are already present. M i missing something while creating the build definition ? – Arpan Buch Oct 20 '14 at 09:40
  • Let me summarize and make sure you say "Yes" to each of these questions: 1) Have you automated Test Cases by unit tests using Visual Studio? 2) Does the build definition you are using build the project that contains these unit tests? 3) Do you build both configurations (Release and Debug)? 4) Are test dlls present in both sub-folders (Release and Debug) in drop location of the build? 5) Do you start your tests from MTM like my picture shows? 6) Do you see the correct build number in MTM like my picture shows? – Elena Oct 20 '14 at 10:09
  • I think , i am not sure about 3 and 4. Can you share some screenshots for the same. or elaborate on 3 n 4th point. – Arpan Buch Oct 20 '14 at 12:06
  • I would suggest we continue our discussion via chat. – Elena Oct 20 '14 at 15:05
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/63381/discussion-between-arpan-buch-and-elena). – Arpan Buch Oct 21 '14 at 05:14
0

It seems like there has been a change in the name of test class or test method, latest build is created with the new changes and also associated to the MTM test plan, but the test case is not updated with the updated automated test, try re-associating test methods from your script to proper test cases present in MTM.

Varun Bajpai
  • 545
  • 5
  • 20