We are trying to run Web tests from our TFS weekly build.
But all tests fail with the following:
System.NullReferenceException: Object reference not set to an instance of an object.
ArtOfTest.WebAii.Core.Manager.SetupDialogMonitoring()
ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
I have registred TFS build interactive port from the following ( http://msdn.microsoft.com/en-us/library/bb399142.aspx ), but that does not seem to have any changes.
any suggestions on what I have been missing ?
best regards
thorri.
6 Answers, 1 is accepted
I am sorry you are running into this problem. Am I correct in assuming the same tests run just fine on your local development machine? What if you manually execute the tests from the command line on the TFS test machine? Here is documentation on how to run tests via MSTest from the command line. Let us know the results of this diagnostic step and we'll go from there.
Greetings,Cody
the Telerik team
Have you looked at the new Online User Guide for Telerik Test Studio?
"Test method MyTest threw exception: System.NullReferenceException: Object reference not set to an instance of an object."
My fealing is that the problem is server side as the Team Foundation Build service is not "Local System account" and "Allow service to interact with desktop" not checked.
Is it possible to let the tests run this way?
cheers,
Eyjolfur
You state "Build service is not "Local System account"... which account is it set to use then?
Regarding " "Allow service to interact with desktop" not checked" this depends on the test. A pure HTML/DOM test (i.e. one that does not move the mouse or use simulated keystrokes) can run this way. Many HTML tests can work this way. However Silverlight and WPF tests cannot. Most actions in that world must use the mouse and keyboard. The "Allow service to interact with desktop" is what allows (or prevents) a process from using the mouse and/or keyboard.
Cody
the Telerik team
Have you looked at the new Online User Guide for Telerik Test Studio?
Hi Eyjolfur,
Make sure that ALL the following conditions are met for the test server (the machine on which the TFS test agent is running which will also be the machine on which the browser will be opened):
a) Test agent is running as an interactive process - not as a service (you will need to specify a user and password for the agent to log on)
b) There is an active login session on the test server for the user mentioned above
c) The test server is not locked, on standby or hibernated when the test runs
d) Browser is not minimized when the test runs.
If all the above are true, log on to the test server yourself (using the user credentials that the test agent is registered under) and see if you can figure out how far it is getting (does the browser come up? does it connect to the site? etc) and what the problem might be (any exception or other dialogs)?
Hope that helps,
Shashi
I have the similar problem problem but we are using Hudson instead of TFS.
The tests run fine on local machine and the server when logged in and running the tests with mstest.exe. Using testlist or testcontainer does not matter, both work fine.
When we run our tests from Hudson as a batch task all of our tests failed with the following:
System.NullReferenceException: Object reference not set to an instance of an object.
ArtOfTest.WebAii.Core.Manager.SetupDialogMonitoring()
ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType
browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle
windowStyle, String arguments)
I also read also http://www.telerik.com/automated-testing-tools/community/forums/test-studio-express/automation-framework/issues-with-telerik-automated-testing-in-hudson-ci.aspx
Could you sumarize once again how hudson should be configured to run run properly tests?
Thanks in advance!
Mateusz
You are probably trying to run your tests on a locked machine. This is known to not work for UI automation. Here's an article describing one possible solution to this problem.
All the best,Cody
the Telerik team
Test Studio Trainings