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

Unit Tests fail when run under scheduled tasks.

1 Answer 98 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
BINDU
Top achievements
Rank 1
BINDU asked on 07 Feb 2012, 09:14 PM

Hello,

I am trying to get the unit tests that are created using Telerik Testing Framework to run automatically on our build machine.  When the tests run I get the following error message.

- <message>
<![CDATA[
System.NullReferenceException : Object reference not set to an instance of an object.
  ]]>
  </message>
- <stack-trace>
<![CDATA[
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(BrowserType browserToLaunch, Boolean waitForBrowserToConnect)
at CFCAWeb.SC.Testing.SponsorsOnlineWeb_AccountHome.MySponsorships_TestBreadCrumb() in C:\Inetpub\wwwroot\CFCABeta\CFCAWeb.SC.Testing\Views\SponsorsOnlineWeb_AccountHome.cs:line 98
  ]]>
  </stack-trace>

I used NUnit framework, and used windows scheduler to schedule the run.  I have setup the 'Run as' userId as mine. Tests start and run fine If I stay logged on to the machine.  However, when I am not logged on to the machine, all  the tests fail giving the error message mentioned above.  I am using ArtOfTest.WebAii.dll version 2011.2.1305.0.

Any idea how I can get around this issue?  
Thanks
Bindu

1 Answer, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 09 Feb 2012, 01:00 AM
Hello,

This is expected. Test Studio (and most UI automation tools) are unable to run on a locked machine. Please read this KB article for additional information.

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
BINDU
Top achievements
Rank 1
Answers by
Cody
Telerik team
Share this question
or