1

im trying to execute CodedUI using a task from vNext Build system,

https://blogs.msdn.microsoft.com/visualstudioalm/2016/03/31/executing-automated-tests-in-build-vnext-using-test-plan-test-suites/

I am Very confused with this Topic, why would i create the Suites and a Tets Plan on TFS but not use the DataSource form the test cases?

this is the error i got.by the way if i remove the Datasource tag then yes the TestPlan its able to find the related Test method and execute the CodedUi automation with no problem.

Error:

The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" (http://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library. Error details: Could not load file or assembly 'Microsoft.TeamFoundation.TestManagement.Controller, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. here is the Method. enter image description here

enter image description here

This is the last Option to execute the Test by Test Plan Suite-. enter image description here

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
emamones
  • 77
  • 7

1 Answers1

1

This is typically caused by a bad TFS url in the attribute or the agent not having access to the TFS instance.

http://www.dotnetcatch.com/2015/10/01/tfs-2010-to-2015-upgrade-codedui-feature-test-builds/

chief7
  • 14,263
  • 14
  • 47
  • 80
  • hey Hi thanks Chief, 1.- i am sure the URL its fine, it was actually created by importing a recording from MTM, also when i run this test on my local computer it works. 2.- the agent having access: the account for the the Test agent task its the same as my windows credentials that are associated in TFS. its so bad that really everyday im dealing with a new stopper :( – emamones Jun 16 '16 at 15:15
  • What about firewalls? Could the server firewall or an external network firewall be blocking access? You may logon to the test controller/agent to ensure you can reach TFS from the box. – chief7 Jun 16 '16 at 19:02
  • yes thats a good guessing , but how should i log in? i have no more test controller installed and the agent its deployed directly from the Build system – emamones Jun 17 '16 at 07:50
  • Thanks again for your help and cooperation, i still have the doubt of what do you exactly mean by logon to the test controller? there is no Test controller, i have TestServer with the TFS and where the Build its created and the TestClient where i want to execute the Test. i am able to open TFS from the TestClient , the TestServer can Deploy the files, so it means it has access to write into the TestClient, can you show me how you configure your Functional Test, do i Need a Run Test Settings file? do i need to run this from a Plan instead of a Test Assembly? – emamones Jun 22 '16 at 09:14
  • After further inspection your error is caused by a DLL which can not be found. Use the following tutorial to enable fusion logs and find what determine which DLL cannot be found. http://blog.mediawhole.com/2010/08/enable-fusion-assembly-binding-logging.html – chief7 Jun 22 '16 at 10:45
  • Hi @chief7 Thanks the problem was exactly because missing assemblies, so i found the path where they should be , but why? why they are not there? why he looks for them there? should iplace them as reference on my project? , this is the path where i placed them, C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow – emamones Jun 22 '16 at 13:46
  • Does the TestClient have VS installed? What version? – chief7 Jun 22 '16 at 14:49
  • no it has no VS , should it be also installed? the Test only runs with console but with the vnext build, just failed. DistributedTests: Error : One or more errors occurred.--->No test assemblies found on the test machine matching the source filter criteria or no tests discovered matching test filter criteria. Verify that test assemblies are present on the machine and test filter criteria is correct. – emamones Jun 23 '16 at 07:47
  • Yes, VS usually has to be installed. This won't fix your new error though. That indicates your test filter criteria is wrong or the test assemblies don't have a test name that matches what you're looking for. – chief7 Jun 23 '16 at 11:01
  • ok , Thanks @chief7, installing VS fix the initial Problem i can now run an Automated test under previous configuration. My Goal its to execute this test By using the option : Test Plan /Suite tree which i found very convenient... if it would work. , The Problem still "No test assemblies found on the test machine matching the source filter criteria" Do i need TestSettings file? if yes what should i config there because all the definition for the agent i feel its now at the Build. – emamones Jul 04 '16 at 13:16
  • Not familiar with "Test Plan/Suite tree", need more details. – chief7 Jul 07 '16 at 10:32
  • With MTM you can create suites based on relatad test cases to test methods. This plan/suites are also available in the task template for testing, i updated the post quuestion, please check the last picture from. – emamones Jul 08 '16 at 10:14
  • Have you associated your test cases with your test code? I think this is required to use the test suite filter. https://blogs.msdn.microsoft.com/girishp/2011/04/06/how-to-associate-automation-for-test-cases-in-visual-studio-2010/ – chief7 Jul 08 '16 at 13:14