This is a migrated thread and some comments may be shown as answers.

Can't find DLL

5 Answers 235 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex
Top achievements
Rank 1
Alex asked on 09 Nov 2011, 12:45 AM
I have been struggling with this issue for a few days now after upgrading to R2, I'm having all kinds of trouble with DLLs. I have my main testing project and a secondary project which has some utility code for accessing DB's etc. Everytime I build its compiles fine, but if I try to run the test I get an error (see below). I've gone through verifying the versions match and setting the proporties to not be specific about version. The dlls are in the bin, so I'm at a loss as to why they can't be found.

As a test I created a new solution/project and threw in a WatiN dll I had and compiled that in my solution (writing some basic script to check something on the google home page) and it failed with the same issue (see below). I'm wondering if there is an issue with non telerik/MS dlls.

Telerik solution issue:
Overall Result: Fail
------------------------------------------------------------
'11/8/2011 6:25:13 PM' - Starting execution....
'11/8/2011 6:25:17 PM' - Detected custom code in test. Locating test assembly: UrbanScience.BMI.Automation.dll.
'11/8/2011 6:25:17 PM' - Assembly Found: C:\VisualStudio2010\DBI-BPO\QA\Main\UrbanScience.BMI.Automation\bin\Debug\UrbanScience.BMI.Automation.dll
'11/8/2011 6:25:17 PM' - Loading code class: 'UrbanScience.BMI.Automation._1_Reusable_Tests.NavigateToTestURL'.
------------------------------------------------------------
'11/8/2011 6:25:18 PM' - 'Fail' : 1. [NavigateToTestURL_CodedStep] : Navigate to Active Browser
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[NavigateToTestURL_CodedStep] : Navigate to Active Browser'.
InnerException:
System.IO.FileNotFoundException: Could not load file or assembly 'UrbanScience.DBI.UnitTestFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'UrbanScience.DBI.UnitTestFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at UrbanScience.BMI.Automation._1_Reusable_Tests.NavigateToTestURL.NavigateToTestURL_CodedStep()
 
Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Program Files (x86)\Telerik\Test Studio 2011.2\Bin\ArtOfTest.Runner.exe
--- A detailed error log follows.
 
=== Pre-bind state information ===
LOG: User = ***********
LOG: DisplayName = UrbanScience.DBI.UnitTestFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Telerik/Test Studio 2011.2/Bin/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Telerik\Test Studio 2011.2\Bin\ArtOfTest.Runner.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Telerik/Test Studio 2011.2/Bin/UrbanScience.DBI.UnitTestFramework.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Telerik/Test Studio 2011.2/Bin/UrbanScience.DBI.UnitTestFramework/UrbanScience.DBI.UnitTestFramework.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Telerik/Test Studio 2011.2/Bin/UrbanScience.DBI.UnitTestFramework.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Telerik/Test Studio 2011.2/Bin/UrbanScience.DBI.UnitTestFramework/UrbanScience.DBI.UnitTestFramework.EXE.
 
------------------------------------------------------------
'11/8/2011 6:25:18 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'11/8/2011 6:25:18 PM' - Overall Result: Fail
'11/8/2011 6:25:18 PM' - Duration: [0 min: 1 sec: 262 msec]
------------------------------------------------------------
'11/8/2011 6:25:19 PM' - Test completed!

Telerik solution using WatiN dll:
Overall Result: Fail
------------------------------------------------------------
'11/8/2011 6:43:08 PM' - Starting execution....
'11/8/2011 6:43:11 PM' - Detected custom code in test. Locating test assembly: WatiN TestProject.dll.
'11/8/2011 6:43:11 PM' - Assembly Found: C:\VisualStudio2010\WatiN\WatiN TestProject\WatiN TestProject\bin\Debug\WatiN TestProject.dll
'11/8/2011 6:43:11 PM' - Loading code class: 'WatiN_TestProject.WebTest1'.
------------------------------------------------------------
'11/8/2011 6:43:12 PM' - 'Fail' : 1. [WatiNTest] : WatiN test
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[WatiNTest] : WatiN test'.
InnerException:
System.IO.FileNotFoundException: Could not load file or assembly 'WatiN.Core, Version=2.1.0.1196, Culture=neutral, PublicKeyToken=db7cfd3acb5ad44e' or one of its dependencies. The system cannot find the file specified.
File name: 'WatiN.Core, Version=2.1.0.1196, Culture=neutral, PublicKeyToken=db7cfd3acb5ad44e'
   at WatiN_TestProject.WebTest1.WatiNTest()
 
Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Program Files (x86)\Telerik\Test Studio 2011.2\Bin\ArtOfTest.Runner.exe
--- A detailed error log follows.
 
=== Pre-bind state information ===
LOG: User = *****************
LOG: DisplayName = WatiN.Core, Version=2.1.0.1196, Culture=neutral, PublicKeyToken=db7cfd3acb5ad44e
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Telerik/Test Studio 2011.2/Bin/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Telerik\Test Studio 2011.2\Bin\ArtOfTest.Runner.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: WatiN.Core, Version=2.1.0.1196, Culture=neutral, PublicKeyToken=db7cfd3acb5ad44e
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Telerik/Test Studio 2011.2/Bin/WatiN.Core.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Telerik/Test Studio 2011.2/Bin/WatiN.Core/WatiN.Core.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Telerik/Test Studio 2011.2/Bin/WatiN.Core.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Telerik/Test Studio 2011.2/Bin/WatiN.Core/WatiN.Core.EXE.
 
------------------------------------------------------------
'11/8/2011 6:43:12 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'11/8/2011 6:43:12 PM' - Overall Result: Fail
'11/8/2011 6:43:12 PM' - Duration: [0 min: 1 sec: 91 msec]
------------------------------------------------------------
'11/8/2011 6:43:13 PM' - Test completed!

5 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 14 Nov 2011, 10:53 AM
Hi Alex,
      would you please send us the entire solution that contains these two project. It's quite hard to tell what the problem is from the exception log only.

One question: did you use Test Studio Express' feature to convert an entire Test Studio test into a Unit test?

I can see your account is not associated with a Test Studio license even though your company does own licenses. Because of this you're unable to open Support tickets with this Telerik account. I would suggest that use a different account (one that is associated with a license) and post your future questions in support tickets. Unlike forum posts, Support tickets have a response time of 24 hours and are also completely confidential.

If you feel the solution I requested at the beginning is too sensitive for a public forum please go ahead and attached to either:
A) Support ticket opened from a different account
B) I can send you an email and you can attach it to your response.

I recommend you go with option A.

Greetings,
Stoich
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Alex
Top achievements
Rank 1
answered on 14 Nov 2011, 02:59 PM
Hi Stoich,

I'm currently working with my company's management to get access to the priority support account, but it may take a while. It would be nice if it would be possible to associate an account that doesn't have access to the licenses, but can get access to priority support.

As far as the solution after the upgrade to R2 the system automatically converted the project to the new R2 version. As far as any other conversion, no, there hasn't been any other conversion.

Until I can get access to an account with priority support I will need to go with option B.

Thank you
0
Stoich
Telerik team
answered on 14 Nov 2011, 06:41 PM
Hello Alex,
    I've went ahead and sent you the e-mail as requested. Once we've gotten to the bottom of the issue I'll post the solution here for all the other forum users to see.

Best wishes,
Stoich
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Elek
Top achievements
Rank 1
answered on 23 Nov 2011, 03:21 PM

Hi

I have a same problem. VS2010/ Test Express (VS Plugin) Version 2011.2.928.0

To reproduce:

  1. Create a Telerik Test Studio project
  2. Create "normal" Class Library Project with a class
    public class Class1
    {
        public void Write(string text)
        {
            Console.Write(text);
        }
    }
  3. Add library project reference to the test project
  4. Create a test case in test project. I use the function from the Class Library inside a coded step in the test project. 

 
 

  1. [CodedStep(@"test lib project")] 
    public void WebTest1_CodedStep() 
        Class1 c = new Class1(); 
        c.Write("test text"); 
    }
  2. Compile OK
  3. Run test
    Overall Result: Fail  
    ------------------------------------------------------------  
    '23.11.2011 15:23:46' - Starting execution....  
    '23.11.2011 15:23:49' - Detected custom code in test. Locating test assembly: DemoTests.dll.  
    '23.11.2011 15:23:49' - Assembly Found: C:\Program Files\Telerik\Test Studio Express 2011.2\Samples\Test Studio\DemoTests\bin\Debug\DemoTests.dll  
    '23.11.2011 15:23:49' - Loading code class: 'DemoTests.WebTest1'.  
    ------------------------------------------------------------  
    '23.11.2011 15:23:50' - 'Fail' : 1. [WebTest1_CodedStep] : @"test lib project  
    ------------------------------------------------------------  
    Failure Information:   
    ~~~~~~~~~~~~~~~  
    Exception thrown executing coded step: '[WebTest1_CodedStep] : @"test lib project'.  
    InnerException:  
    System.IO.FileNotFoundException: Could not load file or assembly 'ClassLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.  
    File name: 'ClassLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'  
       at DemoTests.WebTest1.WebTest1_CodedStep()
0
Stoich
Telerik team
answered on 24 Nov 2011, 03:27 PM
Hello Elek and Alex,
I apologize for the slow response.

@Elek - thank you for providing detailed steps for getting a repro for this - it really helped
@Alex  - thank you for sending your project

This is a minor bug with adding assembly references into a Test Studio project. The way to resolve it is to close the Solution and then reload it again. This video demonstrates it:
http://screencast.com/t/x10SyKmiR
Our engineers are working on getting this resolved.
I trust this solution should take take of the problem. I apologize for the inconvenience.
I've went ahead and added 500 Telerik points to both of your accounts.

As a side note, check out the following codes sample article:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/general/use-external-dll.aspx

it might be of interest to you. You can use the same approach and add the "Utility" project (i.e. the non-test project) into the same solution as the Test Project. This will allow you to edit both with easy (though you'll still need to reset the solution after adding it).

All the best,
Stoich
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Alex
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Alex
Top achievements
Rank 1
Elek
Top achievements
Rank 1
Share this question
or