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

Nunit not able to control browser in build, ok in resharper

3 Answers 89 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 14 Dec 2010, 04:36 AM
I'm trying to move from a windows xp build server to windows 7 64bit. We have a set of unit tests that are run via nunit that fire up a browser using webaii and control a sliverlight application and work correctly on the old build server.

When we moved to the new server, the build can fire up the browser and navigate to the right page, but cant click buttons to control the browser and run the tests. The tests work correctly when running from visual studio, resharper unit test runner.

- I'm using webaii version 2010.2.1007
- It is a silverlight 4 application
- I have turned off UAC in windows 7

What if any IE 8 settings should I be checking?
What other things should I be checking?

3 Answers, 1 is accepted

Sort by
0
Keaegan
Telerik team
answered on 17 Dec 2010, 12:16 AM

Hello Brian,

Due to the transition to a true 64-bit OS, Visual studio is most likely trying to launch the 64-bit version of IE (which we are not compatible with). To fix this, please do the following:

  1. Right-click the test project in question and choose Properties
  2. The next portion will differ depending on whether you are using VB or C#, so review Microsofts article on changing target platform and use the process appropriate to you

After you do this, please re-test your issue. Also, since you are migrating OS's you may also be migrating versions of Visual Studio. One "gotcha" introduced within VS 2010 is that Enable Deployment within the Local.testsettings file is turned off (un-checked) by default. You will also want to make sure to check this box as well if you have not done so already.

If you are unsure if IE 8 has been configured correctly or not, reset the settings to default then follow the instructions in our IE8 setup guide (once you load the page, click the '+' next to Configure your Browser, then click Configure IE 7 & 8).

These will be the most likely items to cause this type of issue after your transition. Please let us know if you still experience issue after doing the above.

Best wishes,
Keaegan
the Telerik team

Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Brian
Top achievements
Rank 1
answered on 17 Dec 2010, 06:24 AM
Hi, I dont think you are clear.

It works when we launch from VS.Net, but not when we run from Nunit outside the visual studio.

Just to be clear, we need to set the project with the nunit tests that fire up webaii to x86 architecture in the build options?
0
Cody
Telerik team
answered on 23 Dec 2010, 12:27 AM
Hello Brian,

It is important to set your test projects to build in x86 mode. The default is "Any CPU" which means it will run in 64 bit mode on a 64-bit platform and 32-bit mode on a 32 bit platform. The framework is only compatible with 32-bit mode. However usually the problem is the test won't run at all under any condition when this is the cause.

So you're saying, on the same machine (the new 64 bit Win7 machine) the tests run great when executed under Visual Studio on that machine but not when run via the build process on that machine? What are you using for a build server? I don't know what could cause this behavior... unable to click on buttons.

Wait, is the build server running under a service? It might be an Interactive Desktop permissions thing. It is common for Windows Services to not be granted the Interactive Desktop permission which is required for real mouse and keyboard actions. Can you investigate this? We often have to instruct people that they need to run their testing agent service as in console mode. For example here's our instructions for TeamCity.

Kind regards,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Tags
General Discussions
Asked by
Brian
Top achievements
Rank 1
Answers by
Keaegan
Telerik team
Brian
Top achievements
Rank 1
Cody
Telerik team
Share this question
or