santoguya
14 years agoContributor
Using Hyper-V for virtual machine testing
I'm using Hyper-V to manage and create virtual machine images, and I'm trying to figure out how to write a TestComplete script on a phsyical machine to execute Hyper-V, load an virtual image (image has a clean OS with TestExecute installed), and then kick off TestExecute on that virtual image.
I've looked through the article "Automating Testing in Virtual Labs" http://www.automatedqa.com/techpapers/testcomplete/automated-testing-in-virtual-labs/ and I see it can be done using VMWare.
Can the same thing be done with Hyper-V? Something like the following code:
Sub sub1
Dim vmHost, vmMachine
Set vmHost = dotNET.Vestris_VMWareLib.VMWareVirtualHost.zctor
vmHost.ConnectToVMWareWorkstation
Set vmMachine = vmHost.Open("c:\VMWare virtualmachines\vm1.vmx")
vmMachine.PowerOn(5000)
Call vmMachine.Login("tester", "password")
vmMachine.PowerOff
End Sub
Thanks!
I've looked through the article "Automating Testing in Virtual Labs" http://www.automatedqa.com/techpapers/testcomplete/automated-testing-in-virtual-labs/ and I see it can be done using VMWare.
Can the same thing be done with Hyper-V? Something like the following code:
Sub sub1
Dim vmHost, vmMachine
Set vmHost = dotNET.Vestris_VMWareLib.VMWareVirtualHost.zctor
vmHost.ConnectToVMWareWorkstation
Set vmMachine = vmHost.Open("c:\VMWare virtualmachines\vm1.vmx")
vmMachine.PowerOn(5000)
Call vmMachine.Login("tester", "password")
vmMachine.PowerOff
End Sub
Thanks!