Change Screen Resolution Utility Is Now Available On Chocolatey

Share on facebook
Share on twitter
Share on linkedin

Automated UI tests are a great way for teams to start building automated regression suites to give confidence in deploying applications more often without sacrificing quality. Tools like LogiGear TestArchitect and Selenium provide the ability to create maintainable UI tests. UI Tests typically require virtual machines in order to execute these tests and Azure provides a cost effective environment to run automated UI tests by shutting down the VMs when the tests are not running. One challenge is that the test agents don’t allow any control over the screen resolution on these VMs. It is often something very restricted like 640 x 480 or 800 x 600. This can cause the UI to render differently than how most users will use the application which could cause problems with the tests executing consistently.

About two years ago I built a small utility called change-screen-resolution that we have been using with our clients and I published the source code to it on so others could utilize it.  Up until now, I just had the source code available on GitHub so it still took anyone a few steps to get it usable.  

Today I’m happy to announce that the Change Screen Resolution utility is available through the Chocolatey package management system.  If you are not familiar with Chocolatey, think of it as a way to download and install software through a simple command.  For example if you want to install NodeJS, you simply need to install Chocolatey and then run “choco install nodejs”.  For the Chance Screen Resolution utility,  it is exciting because now you can install and configure the utility through with a simple command.   The command can be included in any infrastructure provisioning script to fully utilize the on-demand capabilities of the cloud.  Through Chocolatey’s automatic shim process the utility is automatically available from any command prompt, PowerShell, or GUI interface window without any modifications to the PATH.

Change Screen Resolution package on Chocolatey

https://chocolatey.org/packages/change-screen-resolution/1.0.1.0

Basic call

choco install change-screen-resolution

change-screen-resolution 1920 1080

Advanced call that will enable the utility on startup and enable file logging

 choco install change-screen-resolution  –params “‘/RunAtStartup:true /EnableLogging:true'”

Full list of options

* `/RunAtStartup` – determines whether to run at startup. Great for Auto UI VMs – defaults to “false”
* `/LoggingEnabled` – Toggle file logging true/false
* `/EmailEnabled` – Toggles email notifications true/false
* `/EmailFrom` – specify the from address for email notifications
* `/EmailTo` – specify the to address for email notifications
* `/SendGridUser` – specify the sendgrid account username
* `/SendGridPwd` – specify the sendgrid account password

Issues, suggestions, and contributions are all welcome at the https://github.com/mikedouglasdev/changescreenresolution and on twitter at @mikedouglasdev

More to explore

Leave a Reply

Your email address will not be published. Required fields are marked *