Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Distributed test failure due to api execution error
interhan
#1 Posted : Wednesday, January 8, 2014 12:23:29 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/13/2012(UTC)
Posts: 6
Location: Seoul

Thanks: 1 times
I've tried some of my test cases via distributed server which works well in most cases, but some number of test cases are getting failed 'only on distributed server' but works perfectly on local machine, or CI build machines.

While I debug those, I could see some win32api call leaves 1459 that ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION, assume due to server's runner instance is non-ui service.

Question is, is it possible to update server instance to not make those errors?
Remco
#2 Posted : Wednesday, January 8, 2014 4:49:01 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi, thanks for posting.

In theory, this should be as simple as updating the NCrunch Grid Node Service to allow it to interact with the desktop.

After you've installed/setup the grid node, simply open up the windows services control panel and look for the service. Go to the service properties, and under 'Log On' check the box 'Allow service to interact with desktop'. If this doesn't do the trick, you may wish to try setting up the service to log in as a local user instead of using the Local System account.
interhan
#3 Posted : Wednesday, January 8, 2014 6:58:40 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/13/2012(UTC)
Posts: 6
Location: Seoul

Thanks: 1 times
Thanks for answer, but unfortunately both of way didn't work.
Remco
#4 Posted : Thursday, January 9, 2014 12:01:47 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Sadly, there may not be much else I can suggest in this case that will get this code to run on the grid node. If the API call requires the code to run as a desktop (non-service) application, the execution environment of the grid node simply cannot process it.

I would recommend perhaps stubbing the call out through an injected dependency controlled by the test, or using conditional compilation to prevent the API from being called when NCrunch is executing this code.

Another option would be to mark tests executing this code as being able to run on desktop machines only, through the use of capabilities. In this way, the tests exhibiting the problem would run on your local machine, and the other tests could be run on the grid node.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.031 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download