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?
Build/Test Issues
Distributed test failure due to api execution error
Started by interhan on 5,766 views
Remco NCrunch Developer
#5023
08 Jan 2014 04:49 UTC
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.
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.
Thanks for answer, but unfortunately both of way didn't work.
Remco NCrunch Developer
#5027
09 Jan 2014 00:01 UTC
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.
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.
Post a reply
Log in to reply.