TFS Continuous Int Build Server No Web Browser

6 posts, 0 answers
  1. Nick Wood
    Nick Wood avatar
    126 posts
    Member since:
    Feb 2010

    Posted 08 Jan 2011 Link to this post

    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





  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 08 Jan 2011 Link to this post

    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
  3. Nick Wood
    Nick Wood avatar
    126 posts
    Member since:
    Feb 2010

    Posted 09 Jan 2011 Link to this post

    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
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 13 Jan 2011 Link to this post

    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
  5. kfrancis
    kfrancis avatar
    69 posts
    Member since:
    Dec 2008

    Posted 21 Jan 2013 Link to this post

    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.
  6. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 22 Jan 2013 Link to this post

    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
Back to Top