Server Fault Asked by Scrontch on November 24, 2021
I’ve got a strange issue with our automated test system.
This is a Windows Server 2016 VM that runs various automated functional tests around our business application.
In some tests, we produce image files (.png) that represent charts and such.
The images are produced with code targeting the Win32 GDI API.
These images files are binary-wise compared to existing files that are stored in the test system to see if we have any functional regressions.
And whenever they don’t match, the corresponding tests turn red.
For information, if it might be relevant, the tests themselves are run via a scheduled TFS (MS Team Foundation Server) task and there’s a TFS agent service running on the machine that executes those tests.
Now it happens that regularly the generated images differ slightly, although there is no functional evolution.
That is obviously very annoying because it breaks the tests for no reason.
I have tracked down those changes to the way the font is rendered on the charts.
(Sorry, I can’t post examples because of business confidentiality.)
But the differences seem to be subtle differences in the way characters are anti-aliased for blending with the background.
I have made some experiments and for example found that Windows ClearType settings will influence the outcome, but i don’t know what the exact reason is in my particular case.
But anyways, I’d expect the results to be the same on every test run as long as nobody changes those settings.
Now the problem is that different people will connect to that machine via Windows RDP (remote desktop – using the same account as the TFS agent!) during the day.
(Tests are run during night)
What i suspect is that during these connections, the Windows rendering subsystem somehow adapts to the settings from the remote desktops.
Thus changing some of the rendering options and giving different images as a result.
So my quetion is:
Can i somehow force Windows (ideally programatically) to reset the Windows rendering subsytem to default values that will give same result in image rendering every time?
or alternatively, can i instruct Windows so that it will in no case change any of its rendering options when accepting RDP connections?
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP