3

I was tasked to automate our department's testing process.
To do the testing I first have to install a setup of our application on the host system and run another application, the tester, afterwards.
The tester application uses an ActiveX control to control the previously installed application. In order to run the tester application I need a graphical interface, so I can't run the tests headless.

To automate the process I thought about using Hyper-V and a Powershell script to automatically deploy clean Windows VMs, install the setup, run the tester application and destroy the VM afterwards.

The deployment process works just fine but now comes the tricky part of actually running the tester application without manually interacting with the VM.
Initially I thought that I could remote control the VM via Powershell and just execute the tester application that in turn opens up its GUI and does the testing.

Unfortunately I was wrong. I googled around for a bit but couldn't really find anything so far that worked.

My question is now if my approach is feasible and if it is how I possibly solve my problem?

TorbenJ
  • 213
  • 1
  • 2
  • 7

1 Answers1

2

What I would do is set an auto-logon in the VM with a generic user for your tests, and create an executable (or a script) that you would add in one of the auto-start location of Windows C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp for example.

This little program will contact a web service by passing the VM name as a parameter in the request, then, the web service will output a list of tasks, or a command to start in your VM.

Then you can create a management tool to create the relationship between the VMs and the "tasks".

If you don't want to create a webservice, you can simply put text files or PowerShell scripts in a file share (the file name would be the VM name for example) and you just have to start/read the corresponding file when the VM starts.

Swisstone
  • 6,725
  • 7
  • 22
  • 32
  • Oh never thought about auto start :) A webservice is not needed in the first place but is planned for a future expansion of the system. Thanks a lot, will try this approach in the next days – TorbenJ Nov 23 '17 at 18:12