Locked Spec Explorer DLLs not deploying to test agent

  • Tuesday, July 24, 2012 12:54 AM
     
     

    I have a TestSuite project with Spec Explorer generated tests that run fine in Visual Studio on my local machine. But when I try to run the tests on a test agent connected to a test controller, the test fails with an error saying the TestSuite.DLL file cannot be found.

    In the Deployment folder on the test agent, the TestSuite.dll file exists but the name is in all lowercase, and none of the Spec Explorer DLLs which I have references to were deployed.

    I see the same error with the Account sample project installs with Spec Explorer, when I add a test settings file to the project that points to the test controller and test agent:

    Unable to get type TypeBindingSample.TestSuite, TestSuite, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. Error: System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Users\...\Documents\Spec Explorer 2010\Samples\Visual Studio 2010\Account\TestSuite\bin\Debug\TestSuite.DLL' or one of its dependencies. The system cannot find the file specified.
    File name: 'file:///C:\Users\...\Documents\Spec Explorer 2010\Samples\Visual Studio 2010\Account\TestSuite\bin\Debug\TestSuite.DLL'
       at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
       at System.Reflection.Assembly.LoadFrom(String assemblyFile)
       at Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestExecuter.GetType(UnitTestElement unitTest, String type)
       at Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestExecuter.ResolveMethods()

    The same thing is happening, the testsuite.dll file is in lowercase and the Spec Explorer DLLs are not deployed. The error does not occur when run locally. 

    My dev box is 64 bit and the test agent is 32 bit. The test agent does not have Spec Explorer installed. I would not expect that to be required though since the project references the Spec Explorer DLLs. We have other tests not generated from Spec Explorer that deploy and run fine in this environment.

    I would appreciate any suggestions on how to run Spec Explorer generated tests on an MS test agent with a test controller.


    To realize that you do not understand is a virtue; Not to realize that you do not understand is a DEFECT. -- Lao Tzu

All Replies

  • Tuesday, July 24, 2012 3:53 PM
     
     Answered

    Hi SeekerKeeper,

    have no clue about Visual Studio Agents 2010.
    A simple idea: try to copy all references locally:

    So set for these

    * Microsoft.Xrt.Runtime
    * Microsoft.SpecExplorer.Runtime
    * Microsoft.SpecExplorer.DynamicTraversal
    * Microsoft.SpecExplorer.ObjectModel
    * etc.

    Properties - Copy Local - True. And Rebuild.

    Probably you did this already ...

    • Marked As Answer by SeekerKeeper Tuesday, July 24, 2012 4:41 PM
    •  
  • Tuesday, July 24, 2012 4:45 PM
     
     
    Thanks, I just tried that, that was exactly the issue. The Reference Properties had the Copy Local set to False by default. Once I set it to True the tests worked.

    To realize that you do not understand is a virtue; Not to realize that you do not understand is a DEFECT. -- Lao Tzu