I have a set of automated checks running in a VM. The same cases are scheduled to executed against Chrome, Firefox and IE browsers. Internet explorer tests always fail with a black screen. Why? How can I solve this issue? I've tried suggestion like leaving the VM logged on and so on but didn't help...
2 Answers
To run visual tests on windows virtual machines you will need to disable the screen-saver, hibernate and auto-locking.
To schedule tests you need to make sure the schedule runs them as the active logged in user. By default scheduled windows tasks run with the access of the service itself. This service has it's own desktop environment. You need to setup the RunAs correctly.
I would use a CI services like Jenkins, TeamCity or CircleCI. They have services called agents which by default are configured correctly to run you test runs. Install the agent on the VM and let the Ci services take care of it. Might also need extra configuration still, but at least my experience is good with it.
-
+1 I added circleCI another CI alternative which i personally have found more modern and easier to use than Jenkins. Commented May 3, 2017 at 10:11
Check and see if the VM is going into hibernate mode. We dealt with something similar and had to configure the machines to remain unlocked and on in order to ensure we were able to run at any time.