6
3
I have several Windows Server 2012 virtual systems, mainly on AWS. These systems are used to perform browser based UI tests using Selenium. The tests need to be started with a specific user account, because that user has the UI environment properly configured for running the tests.
To understand the scenario, imagine that you log in to a remote virtual system via e.g. RDP, configure your desktop environment for running the tests, and then you start up the tests and watch them running. So far so good, if I run the tests this way, everything is OK.
In order to automate the whole process, I configured the test clients as Jenkins Slaves. Important note is that I had to start the Jenkins Slave process with the same user account that has the UI environment configured for the tests. This ensures that the proper user account and UI environment is used when I fire up the tests via Jenkins. At the end, I could run the test this way from Jenkins successfully as long as I had the RDP connection open.
The problem is that as soon as I disconnect from the test client, the tests start to fail. It appears that it is required to have an active RDP connection with the specific user account in order to make all the UI tests succeed. This is what I try to eliminate now.
The solution so far seems to be to configure the user account I use for the tests to log on automatically when the test client starts up. To configure the automatic logon I use the Autologon tool, but there are other means as well to achieve the same effect. After system startup my user seems to "log in" successfully, i.e. after bypassing the logon screen it gets its GUI environment initialized with a default 1024x768 screen, also all programs that are defined to start automatically after logon are started successfully, including my Jenkins Slave process.
When I run the UI tests against such test clients via Jenkins, most of the tests complete successfully, except the ones that require a higher resolution than the default 1024x768. This is what I'm trying to find a solution for.
I tried changing the screen resolution with multiple command line tools (like QRes) right after the autologon completes and the Jenkins Slave process starts - with no luck. It seems that without an actual monitor attached, these tools cannot change the resolution. There is this similar question here with some other means to change the default resolution (although non of them seems to work), but please note that in order to make the solution independent of the used virtualization technology, I'm primarily looking for a way to change the default resolution in Windows itself and not via some WMWare or AWS configuration tool.
After googling a bit I only found ways to change the default 1024x768 resolution for custom Windows installation media. This gave me the idea that this 1024x768 default resolution is ingrained somewhere deep but still configurable.
Is there anyone who knows how to change this 1024x768 default resolution for automatic logon? Can anyone suggest who and where else could I ask this question, perhaps there are some forums dealing especially with questions related to such Windows internals?
2Are your users connecting via RDP, or something else? – Rowland Shaw – 2014-12-16T14:15:04.460
1
May be some hints there: http://superuser.com/questions/89302/any-way-of-changing-windows-7-screen-resolution-via-command-line#89322
– climenole – 2014-12-16T14:15:42.467Possible Duplicate (no answers yet): Set Windows Server 2012 default screen resolution (VM Ware)
– Ƭᴇcʜιᴇ007 – 2014-12-16T15:06:58.947@Rowland Shaw The users are not connecting in any way, they are just logged in automatically (i.e. bypassing the password screen). I assume this is the same functionality that you get when you configure a physical PC with the option not to ask for password at startup. Then when you switch on your PC you go all the way to the Windows desktop. Same happens now, but this is a VM - as my assumption goes (since I don't understand the internals of this Autlogon tool/functionality). – remark – 2014-12-16T15:14:15.047
@Ƭᴇcʜιᴇ007 Yes, this is a duplicate, now I see. Thanks for pointing it out! – remark – 2014-12-16T15:15:56.067
@climenole No luck with QRes: it says "The graphics mode is not supported!" – remark – 2014-12-16T15:26:37.973
How can they see the desktop if they're not connecting, and there's no monitor attached? – Rowland Shaw – 2014-12-16T16:02:56.447
@Rowland Shaw As as mentioned, the systems are used for automated UI testing. They are booted, a default user is automatically logged in (using Autologon), then this user starts up a Jenkins Slave. Once this is ready, from Jenkins Master tests can be executed on this client, and since the Jenkins Slave is started by the user that is autologged, this user's GUI will be used for the autotests. I hope it is clearer now. So no real user will do anything on the client or see anything on the screen, it is an all-automated infrastructure, where only UI tests are run automatically. – remark – 2014-12-16T16:15:39.937
If it is not a big favor to ask, I would like to know why this question was downvoted apart from not realizing that it is a duplicate. I really try to understand to prevent future downvotes, so please explain. – remark – 2014-12-16T16:18:10.213