locked
Running tests assembled from multiple dlls with test agent/controller and MTM RRS feed

  • Question

  •  Hi,

    I have an automation tests solution, assembled from several projects (aka dlls) other than the main assembly in which the TestMethod resides.

    I am trying to run my test from within the MTM, using test controller and test agent.

    The test starts to run, but exists with error since it is unable to bind a specific assembly.

    This is the error:

    Test method CodedUITest.TestCases.TestCases.TC17108 threw exception:
    System.IO.FileNotFoundException: Could not load file or assembly 'Activities, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.WRN: Assembly binding logging is turned OFF.

    The thing is that when I attach automation to a test case, It automatically attaches only the TestMethod dlls. I tried to by-pass it by using ILMerge and to merge all my dlls to a single one, but it doesn't seems to work.

    Does someone have recommendation regarding this? Am I supposed to work with a single dll (project) by design?

    An update:

    Later I found a way to work-around this, in the Test Setting-->Advanced-->Deployment, you can chose more items to be deployed to the test run location.

    Quite unclear for me why I am unable to do this when attaching automation, though. Is there a better way?

    Thursday, July 15, 2010 6:51 AM

Answers

  • Hi

    This is how it is to work. The dependent dll should be dropped to the run location using the Deployment option in TestSettings. The attaching Automation is just meant to identify the TestMethod it has to run.  This has no bearing with the implementation and should be controlled by the Test Deployment.

    thanks

    Rituparna


    http://blogs.msdn.com/rituparna
    • Proposed as answer by Rituparna MSFT Thursday, July 15, 2010 7:46 AM
    • Marked as answer by Ido_ba Saturday, July 17, 2010 6:47 PM
    Thursday, July 15, 2010 7:46 AM

All replies

  • Hi

    This is how it is to work. The dependent dll should be dropped to the run location using the Deployment option in TestSettings. The attaching Automation is just meant to identify the TestMethod it has to run.  This has no bearing with the implementation and should be controlled by the Test Deployment.

    thanks

    Rituparna


    http://blogs.msdn.com/rituparna
    • Proposed as answer by Rituparna MSFT Thursday, July 15, 2010 7:46 AM
    • Marked as answer by Ido_ba Saturday, July 17, 2010 6:47 PM
    Thursday, July 15, 2010 7:46 AM
  • Thanks for your reply.

    I understand that that's the way it works. But, I must add that the idea behind it is unclear to me, since attaching automation to a TC doesn’t  just identifies which test method to use, but also tells the test runner which dll to take, and indeed this dll is being automatically taken from the build folder. It's like MSFT assumed that tests, in most cases, would be assembled from no more than 1 dll. Otherwise what's the point with defining which dlls to take in 2 different places?

    I will be glad to get more clarifications about this, if possible.

     

    Many thanks,

    Ido

     

    Saturday, July 17, 2010 6:46 PM
  • Hi,

    I have similar schenario like Ido has. I mean I have automated test solution assembled from multiple project. I  have given path of drop folder into the Deployment settings of TestSetting in Lab Center. So, all Dlls & Input files are getting deployed properly to Test Agent machine.

    One strange issue I am facing. When I run any test(belong to other machine) from one MTM, It is executing 1st step of test case "opening application browser with URL". After this it is not jumping to other steps of TestCase. I guess, it might not recognizing UI elements. I am not sure. because is not logging any exception. So, unable to recognize the issue.

    Thanks,
     - Umesh

    Tuesday, February 14, 2012 2:22 PM