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

TFS Continuous Int Build Server No Web Browser

5 Answers 110 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nick Wood
Top achievements
Rank 1
Nick Wood asked on 09 Jan 2011, 03:52 AM
Hi There

I am trying to run Silverlight tests that are run automatically run on the TFS build server. I am getting the following test failure exception:

Error Message:
Test method WDAdminServerUI.UnitTests2.AddNewUserBasicUnitTest.AddNewUserBasic threw exception:
System.NullReferenceException: Object reference not set to an instance of an object.

Error Stack Trace:
ArtOfTest.WebAii.Core.Manager.SetupDialogMonitoring()
ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser()
WDAdminServerUI.UnitTests2.AddNewUserBasicUnitTest.AddNewUserBasic() in c:\Builds\1\WandDisplayAdminUI\WandDisplayAdminUIDevBuild\Sources\WDAdminServerUI.UnitTests2\AddNewUserBasicUnitTest.cs: line 191

Line 191:
Manager.LaunchNewBrowser();


So it would seem that the Manager is null.



Can you please tell me what could be causing this?


Nick





5 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 09 Jan 2011, 04:18 AM
Hi Nick Wood,

It's not the Manager object that is null. If it were the stack trace would not have included ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(). It appears something is going wrong inside of ArtOfTest.WebAii.Core.Manager.SetupDialogMonitoring(). I take it the test runs just fine on your development box? I am going to guess that you're running the test agent as a service. When it is running as a service it is not granted the Interactive Desktop Permission by windows. This prevents WebAii tests from performing any sort of desktop interactions i.e. mouse moves, mouse clicks, keyboard typing, working with Windows dialogs, etc.Please follow this MSDN article.

All the best,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Nick Wood
Top achievements
Rank 1
answered on 09 Jan 2011, 06:36 AM
Thanks Cody

I have set both the Telerik service and the build service aggent to "Allow Interaction with the Desktop" as well as set the service user accounts to my Admin account.

Is this what you meant?

It did not change, I still get the same exceptions.

Nick
0
Cody
Telerik team
answered on 13 Jan 2011, 04:32 PM
Hi Nick Wood,

Yes that is exactly what I was referring to. I am sorry to hear it did not resolve the issue.

How about we take a step back and try go to a simple test. It sounds like the test you're trying to work with is doing some sort of dialog handling. Can we take that out of the picture? What I mean is create an extremely simple test that only launches a browser, navigates to any website and nothing more. Does this very simple test work in your build environment?

Kind regards,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Kori
Top achievements
Rank 2
answered on 21 Jan 2013, 09:28 PM
Nick,

I'm actually seeing the same sort of thing:

2013-01-21 16:17:00.2526 ERROR: Uh oh! System.NullReferenceException: Object reference not set to an instance of an object.
   at ArtOfTest.WebAii.Core.Manager.SetupDialogMonitoring()
   at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
   at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser()
   at EDT.WebConnect.MCEDTConnector..ctor()
   at EDT.WebConnect.Program.Main(String[] args)

Except I'm not using this with a build server, I'm just trying to run a little app that automates a website (uploads a file) but without a user logged in.
0
Cody
Telerik team
answered on 22 Jan 2013, 03:06 PM
Hi kfrancis,

"I'm just trying to run a little app that automates a website (uploads a file) but without a user logged in."

I am sorry but this is not possible. Test Studio must launch a browser to do its work. If no user is logged on, Windows will not allow the browser application to be launched. In addition our dialog monitoring canot initialize when no user is logged on. Windows gives us a NULL when we ask for the active desktop. This can be disabled, but you still must have a user logged on in order to launch the browser.

Kind regards,
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Nick Wood
Top achievements
Rank 1
Answers by
Cody
Telerik team
Nick Wood
Top achievements
Rank 1
Kori
Top achievements
Rank 2
Share this question
or