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

Failed to run a test

5 Answers 250 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 01 Sep 2010, 04:31 PM
Hi

I've been trying to run a simple test using NUnit:

[Test]
public void SimpleTest()
{
    Manager.LaunchNewBrowser();
    ActiveBrowser.WaitUntilReady();
    ActiveBrowser.Window.Maximize();
    ActiveBrowser.NavigateTo(MyServerUrl);
 
    var headerItems = new HeaderItems(MySilverlightApp);
    headerItems.ReportsNavigationButton.User.Click();
}

On the last line I'm getting following error: unable to load ArtOfTest.Connector.dll

My configuration is: Windows 7, IE8, VisualStudio 2010, WebUI Test Studio (trial) 2010.2.830.0.
I could successfully run similar tests on Windows XP.

My observation is that the WebUI installer didn't add keys to the registry HKLM\Software (i.a. containing a path to the WebUI installation). I updated the keys using example from machine with Windows XP, but it didn't help.

thank you in advance
kind regards
Mark

---
Detailsed error message:
...
[16:34] - Unable to load ArtOfTest.Connector.dll
[16:34] - Exception Details:
[16:34] - ------------------
[16:34] - System.ArgumentNullException: Wartość nie może być zerowa.
Nazwa parametru: ptr
   w System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr ptr, Type t)
   w ArtOfTest.Common.Win32.WindowManager..cctor()
 
System.NullReferenceException : Odwołanie do obiektu nie zostało ustawione na wystąpienie obiektu.
w IFin24App.WebAii.ApplicationElements.HeaderItems.get_ReportsNavigationButton() w HeaderItems.cs: line 53
...

5 Answers, 1 is accepted

Sort by
0
Nikolai
Telerik team
answered on 06 Sep 2010, 05:56 AM
Hello Mark,

I just want to make sure that you have instantiate and started the Manager properly. Before you can launch new browser first you must call Manager.Start() method. 
Here you can find a topic how to configure IE 8 to work with WebAii framework.

About the Registry keys they should look like this(if you did default install):
For 32bit Windows:
Path: HKEY_Local_Machine\Software\Telerik\WebUITestStudio\Frameworks\WebAii 2010.2
Key: InstallPath
String Value:
C:\Program Files\Telerik\WebUI Test Studio 2010.2\

For 64bit Windows: 
Path: HKEY_Local_Machine\Software\Wow6432Node\Telerik\WebUITestStudio\Frameworks\WebAii 2010.2
Key: InstallPath 
String Value:
 C:\Program Files (x86)\Telerik\WebUI Test Studio 2010.2\

Can you also confirm that the ArtOfTest.Connector.dll exists under "C:\Program Files\Telerik\WebUI Test Studio 2010.2\Bin\" path

As a last resort you can try reinstall but please run the Installer with Administrator privileges both it and the WebUI TestStudio require them. 

Sincerely yours,
Nikolai
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mark
Top achievements
Rank 1
answered on 07 Sep 2010, 12:43 PM
Hi

1. My test class is of type ArtOfTest.WebAii.TestTemplates.BaseTest. I am running a method BaseTest.Initialize(...) at the start of each test. I believe it's equivalent to the Manager.Start().
2. I configured IE8 according to your description.
3. I use 64bit Windows. Despite the presence of the key HKEY_Local_Machine\Software\Wow6432Node\Telerik (which has in fact been added by the installer), the WebAii still requires a key under HKEY_Local_Machine\Software\Telerik. I duplicated it from HKEY_Local_Machine\Software\Wow6432Node
4. ArtOfTest.Connector.dll exists under the install path /Bin. 
5. I reinstalled the WebUI studio with Administrator's privileges. I also started VisualStudio with Administrator's privileges.

Yet still no effect (error message as above). If you get some ideas what to check next, please let me know.

thank you for your answer
kind regards
Mark


0
Brian
Top achievements
Rank 1
answered on 09 Sep 2010, 01:53 PM
I'm having the same issue, x64 windows 7 ultimate. 

Any news Telerik on this one? Its proving to be quite a pain as I cant run tests the guy next to me on WinXP can. 
0
Brian
Top achievements
Rank 1
answered on 10 Sep 2010, 01:16 AM
So I have the same errror:

Using: ArtOfTest.Common, Version=2010.2.830.0, Culture=neutral, PublicKeyToken=14a0200bfcbb7b62
[10:14 AM] - OS: Microsoft Windows NT 6.1.7600.0
[10:14 AM] - Unable to load ArtOfTest.Connector.dll
[10:14 AM] - Exception Details:
[10:14 AM] - ------------------
[10:14 AM] - System.ArgumentNullException: Value cannot be null.
Parameter name: ptr
   at System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr ptr, Type t)
   at ArtOfTest.Common.Win32.WindowManager..cctor()

It apears as though it can fire up the browser, and navigate to, but cant actually click buttons.

Some notes, I'm on a coprate controlled windows 7 enterprise machine with admin rights, VS is running as Admin so I can run through IIS. I'll try turning of UAC and not running as admin next to see if that works.

0
Mark
Top achievements
Rank 1
answered on 16 Sep 2010, 10:30 AM
Hi

We eventually found a solution:
1. On your test project select: Properties -> Build. Set "platform target" to "x86".
2. Remember to run VisualStudio with Administrator's privileges.

kind regards
Mark
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Nikolai
Telerik team
Mark
Top achievements
Rank 1
Brian
Top achievements
Rank 1
Share this question
or